Skip to content

Commit

Permalink
refactor: 리뷰 반영4
Browse files Browse the repository at this point in the history
- 비즈니스 로직 에러와 DB접근에러 시 http 상태코드를 500이 아닌 400을 반환하도록 수정
  • Loading branch information
fucct committed May 14, 2020
1 parent f55d5a3 commit 5cd4b14
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected ResponseEntity<ErrorResponse> handleMethodArgumentNotValidException(
@ExceptionHandler({BusinessException.class, DataAccessException.class})
protected ResponseEntity<ErrorResponse> handleBusinessException(final Exception e) {
final ErrorResponse response = new ErrorResponse(e.getMessage());
return new ResponseEntity<>(response, HttpStatus.INTERNAL_SERVER_ERROR);
return new ResponseEntity<>(response, HttpStatus.BAD_REQUEST);
}

@ExceptionHandler(Exception.class)
Expand Down

0 comments on commit 5cd4b14

Please sign in to comment.