public class ValiktorExceptionHandler
Represents the REST controller that handles ConstraintViolationException and returns an appropriate HTTP response.
| Constructor and Description |
|---|
ValiktorExceptionHandler(ValiktorConfiguration config)
Represents the REST controller that handles ConstraintViolationException and returns an appropriate HTTP response.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<org.valiktor.springframework.web.payload.UnprocessableEntity> |
handleConstraintViolationException(org.valiktor.ConstraintViolationException ex,
java.util.Locale locale)
Handle ConstraintViolationException and returns 422 (Unprocessable Entity) status code
with the constraint violations.
|
public ValiktorExceptionHandler(ValiktorConfiguration config)
Represents the REST controller that handles ConstraintViolationException and returns an appropriate HTTP response.
config - specifies the class ValiktorConfigurationconfig - specifies the class ValiktorConfigurationpublic org.springframework.http.ResponseEntity<org.valiktor.springframework.web.payload.UnprocessableEntity> handleConstraintViolationException(org.valiktor.ConstraintViolationException ex,
java.util.Locale locale)
Handle ConstraintViolationException and returns 422 (Unprocessable Entity) status code with the constraint violations.
ex - specifies the ConstraintViolationExceptionlocale - specifies the Locale of the Request