Last active
April 6, 2020 13:43
-
-
Save wkorando/6092c5284bc1a2692025a36b2eb8ea07 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ExceptionHandler(ClientException.class) | |
public ResponseEntity<String> clientError(ClientException e) { | |
return ResponseEntity.badRequest().body(e.getMessage()); | |
} | |
@ExceptionHandler(NotFoundException.class) | |
public ResponseEntity<String> resourceNotFound(NotFoundException e) { | |
return ResponseEntity.notFound().build(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment