Skip to content

Commit

Permalink
feat-be(Global Exception): 최상단 예외 필터링 핸들 추가 (#622)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Do Yeop Kim <113661364+Dobby-Kim@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and Dobby-Kim authored Aug 22, 2024
1 parent 39b0c48 commit 559c5bc
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,13 @@ public ResponseEntity<ProblemDetail> handleInternalServerException(InternalServe
);
return ResponseEntity.of(problemDetail).build();
}

@ExceptionHandler
public ResponseEntity<ProblemDetail> handleUnexpectedException(Exception e) {
ProblemDetail problemDetail = ProblemDetail.forStatusAndDetail(
HttpStatus.INTERNAL_SERVER_ERROR,
"예기치 못한 오류가 발생하였습니다."
);
return ResponseEntity.of(problemDetail).build();
}
}

0 comments on commit 559c5bc

Please sign in to comment.