November 2017
Intermediate to advanced
420 pages
10h 29m
English
The framework throws javax.validation.ValidationException or its subclass exceptions, such as javax.validation.ConstraintViolationException, when the Bean Validation rules that you set on the model class fails at runtime. The JAX-RS runtime will report the validation error back to the client with a 500 (internal server error) HTTP status code. You can override the default validation exception handling by providing a custom javax.ws.rs.ext.ExceptionMapper class. We discussed ExceptionMapper a while ago in the Mapping exceptions to the response message using ExceptionMapper section.