@Component public class DefaultValiktorExceptionHandler implements ValiktorExceptionHandler<T>
Represents the default HTTP exception handler to map ConstraintViolationException to an appropriate HTTP response.
public DefaultValiktorExceptionHandler(@NotNull
ValiktorConfiguration config)
Represents the default HTTP exception handler to map ConstraintViolationException to an appropriate HTTP response.
@NotNull public ValiktorResponse<org.valiktor.springframework.http.UnprocessableEntity> handle(@NotNull org.valiktor.ConstraintViolationException exception, @NotNull java.util.Locale locale)
Handles ConstraintViolationException and returns a class ValiktorResponse with status code 422 (Unprocessable Entity)
and class UnprocessableEntity as response body.
exception - specifies the ConstraintViolationExceptionlocale - specifies the Locale extracted from requestclass ValiktorResponse with status code, headers and bodyclass ValiktorResponse,
class UnprocessableEntity