Created
March 31, 2019 18:40
-
-
Save namila007/ab69c4f1c0e836f416b042b1bc9e2ef2 to your computer and use it in GitHub Desktop.
valid body
This file contains 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
@Override | |
@ResponseStatus(HttpStatus.BAD_REQUEST) | |
protected ResponseEntity<Object> handleMethodArgumentNotValid( MethodArgumentNotValidException e, | |
HttpHeaders headers, HttpStatus status, WebRequest request ) | |
{ | |
ApiError apiError = createError( MESSAGE_FOR_INVALID_BODY_ERROR, HttpStatus.BAD_REQUEST, e ); | |
return new ResponseEntity<>( apiError, apiError.getStatus() ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment