Change Exception Handler for Exception to RuntimeException.
This commit is contained in:
parent
d035cf4cc6
commit
d09e6f5b8a
|
@ -24,8 +24,8 @@ public class ExceptionsHandler {
|
|||
return new ResponseEntity<>(new ExceptionResponse(ex, ex.getHttpStatus()), ex.getHttpStatus());
|
||||
}
|
||||
|
||||
@ExceptionHandler(Exception.class)
|
||||
public ResponseEntity<?> exception(Exception ex) {
|
||||
@ExceptionHandler(RuntimeException.class)
|
||||
public ResponseEntity<?> exception(RuntimeException ex) {
|
||||
log.error(ex.getMessage(), ex);
|
||||
return new ResponseEntity<>(new ExceptionResponse(ex, HttpStatus.BAD_REQUEST), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue