Skip to content

Commit

Permalink
[COZY-379] feat: 400에러 발생시 메시지, 코드 출력 로그 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
eple0329 committed Nov 25, 2024
1 parent e23fda5 commit dbb959f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ public ResponseEntity<Object> exception(Exception e, WebRequest request) {
public ResponseEntity onThrowException(GeneralException generalException,
HttpServletRequest request) {

log.info("[ ERROR] rid {} | code {} | message {}", MDC.get(MdcKey.REQUEST_ID.name()),
generalException.getErrorReasonHttpStatus().getCode(),
generalException.getErrorReasonHttpStatus().getMessage());

Sentry.withScope(scope -> {
GeneralException newGeneralException = new GeneralException(
generalException.getErrorReasonHttpStatus().getMessage(), // 메시지
Expand Down

0 comments on commit dbb959f

Please sign in to comment.