Skip to content

Commit

Permalink
feat: Exception 핸들러 추가 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeong-hyeok committed Aug 8, 2023
1 parent a27fb6d commit 7e1a46b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
@RestControllerAdvice
public class GlobalExceptionHandler {

@ExceptionHandler
public ResponseEntity<String> handle(final Exception e) {
log.error("Internal Error occurred", e);
return ResponseEntity.internalServerError().body(e.getMessage());
}

@ExceptionHandler
public ResponseEntity<ErrorResponse> handle(final BusinessException e) {
log.info("businessException: {}", e);
Expand Down

0 comments on commit 7e1a46b

Please sign in to comment.