public class InvalidFormatExceptionHandler
Represents the REST controller that handles InvalidFormatException and returns an appropriate HTTP response.
| Constructor and Description |
|---|
InvalidFormatExceptionHandler(ConstraintViolationExceptionHandler constraintViolationExceptionHandler)
Represents the REST controller that handles InvalidFormatException and returns an appropriate HTTP response.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<org.valiktor.springframework.web.payload.UnprocessableEntity> |
handleInvalidFormatException(com.fasterxml.jackson.databind.exc.InvalidFormatException ex,
java.util.Locale locale)
Handle InvalidFormatException and returns 422 (Unprocessable Entity) status code
with a NotNull constraint violation
|
public InvalidFormatExceptionHandler(ConstraintViolationExceptionHandler constraintViolationExceptionHandler)
Represents the REST controller that handles InvalidFormatException and returns an appropriate HTTP response.
constraintViolationExceptionHandler - specifies the class ConstraintViolationExceptionHandlerconstraintViolationExceptionHandler - specifies the class ConstraintViolationExceptionHandlerclass ConstraintViolationExceptionHandlerpublic org.springframework.http.ResponseEntity<org.valiktor.springframework.web.payload.UnprocessableEntity> handleInvalidFormatException(com.fasterxml.jackson.databind.exc.InvalidFormatException ex,
java.util.Locale locale)
Handle InvalidFormatException and returns 422 (Unprocessable Entity) status code with a NotNull constraint violation
ex - specifies the InvalidFormatExceptionlocale - specifies the Locale of the Request