Skip to content

refactor: 에러 정책 통일 #37

Closed
Tnalxmsk wants to merge 9 commits intodevelopfrom
refactor/#26/error
Closed

refactor: 에러 정책 통일 #37
Tnalxmsk wants to merge 9 commits intodevelopfrom
refactor/#26/error

Conversation

@Tnalxmsk
Copy link
Contributor

Summary

핵심 사용자 플로우의 에러 처리 방식을 공통화했습니다.
console.error 중심 처리에서 Sentry 캡처 + 일관된 사용자 메시지 패턴으로 전환하고, 팀 가이드 문서에 규칙을 추가
했습니다.

Related Issues

Changes

  • lib/error-handler.ts 추가
    • captureAppError, handleAppError, showUserErrorMessage
    • USER_ERROR_MESSAGES 상수 도입
  • 에러 처리 공통 유틸 적용
    • apis/chat.ts
    • hooks/useChat.ts
    • app/survey/hooks/useSurveyCompletion.ts
    • app/result/components/result-client/ResultClient.tsx
    • app/result/components/result-client/hooks/useResultPdfGenerator.ts
    • hooks/usePostResult.ts
  • 문서/가이드 업데이트
    • AGENTS.md에 Error Handling Rules 추가
    • docs/code-quality.md에 Error Handling Policy 추가

How To Test

  1. pnpm lint 실행
  2. 설문 완료 후 결과 요청 실패 상황에서 사용자 메시지 노출 확인 (/survey -> /result)
  3. 결과 페이지 재요청 실패/사전조건 부족 시 메시지 노출 확인 (/result)
  4. PDF 생성 실패 시 메시지 노출 확인
  5. Sentry에서 feature/route/action 태그와 함께 예외 캡처되는지 확인

Checklist

  • Title follows the convention
  • Build passes locally (pnpm build)
  • No breaking changes, or they are documented below
  • Tests added/updated where appropriate
  • Docs/comments updated where helpful

Breaking Changes (if any)

없음.

Notes For Reviewers

없음.

Screenshots / Recordings (if UI changes)

UI 변경 없음.

@Tnalxmsk Tnalxmsk self-assigned this Feb 16, 2026
@vercel
Copy link

vercel bot commented Feb 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
style-me Ready Ready Preview, Comment Feb 16, 2026 3:10am

@Tnalxmsk Tnalxmsk changed the title chore: unify error handling with Sentry and user messages refactor: 에러 정책 통일 Feb 16, 2026
@Tnalxmsk Tnalxmsk closed this Feb 16, 2026
@Tnalxmsk Tnalxmsk deleted the refactor/#26/error branch February 16, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: 에러 처리 정책 통일 (console.error -> Sentry + UX 메시지)

1 participant