feat: 404 not-found 페이지 및 Sentry 로깅 추가#284
Merged
Merged
Conversation
jaeyoung-kwon
commented
Jul 2, 2026
jaeyoung-kwon
left a comment
Contributor
Author
There was a problem hiding this comment.
🤖 PR Review
✅ 확실하게 수정이 필요한 항목을 찾지 못했습니다.
defaultNotFoundComponent 등록, captureNotFound를 통한 Sentry 로깅, beforeSend의 NOT_FOUND 분류 분기가 서로 일관되게 연결되어 있고, 새 유닛 테스트 5건이 각 분류 케이스(NOT_FOUND/5xx/4xx/렌더 크래시/폴백)를 커버합니다. NotFoundCard는 기존 MaintenanceCard/RequireLoginCard 패턴을 그대로 따르고 있어 스타일 일관성도 유지됩니다. 프로덕션 이슈로 이어질 만한 고신호 결함은 발견하지 못했습니다.
🚨 0 Critical ·
📋 검증 과정
- Claude structured review 결과 중 확신도가 있는 항목만 정리했습니다.
- Critical/Major는 inline comment로 게시하고, Minor는 참고 항목으로 summary에 포함합니다.
- 자동 생성된 OpenAPI 타입 선언 파일과 lock 파일은 리뷰 대상에서 제외합니다.
🤖 Claude PR Review
Generated by Claude Code
Contributor
|
오 테스트 추가 좋네요 ㅎㅎ 한 가지 질문이 있는데요, 404를 센트리로 캡쳐하도록 하신 이유가 있으신지 궁금합니다! 사용자가 단순히 url을 잘못 입력한 경우도 잡힐거 같은데, 노이즈가 크지 않을까 해서요! |
Contributor
|
음 그래도 저희 서비스에서 자주나는 오류를 생각해보면 노이즈보다는 센트리로 페이지가 깨지는 이슈를 잡는 이득이 더 클 것 같기도 하네요 ㅎㅎ |
JeLee-river
approved these changes
Jul 7, 2026
JeLee-river
left a comment
Contributor
There was a problem hiding this comment.
404 페이지 좋은데요?!! 작업해주셔서 감사합니다! ㅎㅎ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
없는 경로 접근 시 표시되는 404 not-found 페이지를 신설하고, 해당 진입을 Sentry에 기록합니다. 기존엔
defaultNotFoundComponent가 없어 TanStack Router 기본 화면으로 떨어졌고, 404는 Sentry로도 수집되지 않았습니다.변경 사항
main.tsx—createRouter에defaultNotFoundComponent: NotFound등록pages/system/components/NotFoundCard.tsx— 404 프레젠테이셔널 UI (기존MaintenanceCard/RequireLoginCard스타일, 홈으로 돌아가기)pages/system/components/NotFound.tsx— 마운트 시 Sentry 로깅 후NotFoundCard렌더 (사이드이펙트/뷰 분리)libs/sentry/sentryUtils.ts—captureNotFound({ path })추가 (고정 메시지Route not found+error_type: NOT_FOUND태그 +pathextra)libs/sentry/beforeSend.ts—classifyError에NOT_FOUND분기 추가 (priority: P2,level: warning) — 기존API_ERROR/RENDER_CRASH/JS_RUNTIME분류 체계에 편입libs/sentry/beforeSend.test.ts— 분류 로직 유닛 테스트 신설 (5 케이스)동작
매칭 안 되는 경로 →
NotFound렌더 →captureNotFound1회 발사 →beforeSend가NOT_FOUND로 분류. 대시보드에서error_type:NOT_FOUND필터 +extra.path로 어떤 URL이 404를 내는지 집계 가능합니다.참고
if (isProduction) initSentry) 실제 이벤트는 배포 후 확인 가능합니다. 로컬에선 404 화면 렌더만 확인됩니다.테스트
beforeSend유닛 테스트 5/5 통과 (NOT_FOUND / 5xx·4xx ApiError / 렌더 크래시 / 폴백)🤖 Generated with Claude Code