Skip to content

feat: 예외 처리 로깅 추가 - #19

Merged
ccjngwn merged 1 commit into
developfrom
fix/add-error-logging
Jul 11, 2026
Merged

feat: 예외 처리 로깅 추가#19
ccjngwn merged 1 commit into
developfrom
fix/add-error-logging

Conversation

@ccjngwn

@ccjngwn ccjngwn commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

변경 사항

  • 전역 예외 핸들러에 로깅을 추가했습니다.
  • BusinessException, validation 실패, request body 파싱 실패는 warn 레벨로 기록합니다.
  • 예상하지 못한 예외는 stack trace와 함께 error 레벨로 기록합니다.

배경

프론트에서 잘못된 요청을 보내거나 서버에서 에러 응답을 내려도 현재 서버 로그에서 원인을 확인하기 어려웠습니다. 운영 장애 확인 시 응답 코드와 메시지를 Docker logs에서 추적할 수 있도록 했습니다.

검증

  • ./gradlew test 통과

Summary by CodeRabbit

  • Bug Fixes
    • Improved error monitoring by recording detailed logs for business, validation, malformed request, and unexpected server errors.
    • Unexpected errors now include full diagnostic details in internal logs while preserving the existing error response for users.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 09641f72-af9b-4fc2-b8ab-4d4c32af1a99

📥 Commits

Reviewing files that changed from the base of the PR and between d8b289e and 24e4b1c.

📒 Files selected for processing (1)
  • src/main/java/com/cotato/cokerthon/global/exception/GlobalExceptionHandler.java

📝 Walkthrough

Walkthrough

GlobalExceptionHandler now uses Lombok logging and records warning or error messages in each exception handler before returning the existing error responses.

Changes

Exception Handler Logging

Layer / File(s) Summary
Add exception handler logging
src/main/java/com/cotato/cokerthon/global/exception/GlobalExceptionHandler.java
Adds @Slf4j and logs business, validation, request parsing, and unexpected exceptions with their relevant codes, statuses, messages, or stack traces.

Estimated code review effort: 2 (Simple) | ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/add-error-logging

Comment @coderabbitai help to get the list of available commands.

@ccjngwn
ccjngwn marked this pull request as ready for review July 11, 2026 00:22
@ccjngwn
ccjngwn merged commit 6a5deca into develop Jul 11, 2026
2 checks passed
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.

1 participant