Skip to content

Commit 6b9828a

Browse files
committed
refactor: add response status to exception handler
1 parent f87291b commit 6b9828a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/org/umaxcode/exception/GlobalExceptionHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public ErrorMessage accessDeniedHandler(AccessDeniedException ex, HttpServletReq
5151
}
5252

5353
@ExceptionHandler(MethodArgumentNotValidException.class)
54+
@ResponseStatus(HttpStatus.BAD_REQUEST)
5455
public ErrorMessage handleArgumentNotValidException(MethodArgumentNotValidException ex, HttpServletRequest request) {
5556

5657
Map<String, String> errors = new HashMap<>();

0 commit comments

Comments
 (0)