Class ConstraintViolationExceptionMapper

  • All Implemented Interfaces:
    javax.ws.rs.ext.ExceptionMapper<javax.validation.ConstraintViolationException>

    @Priority(5000)
    public final class ConstraintViolationExceptionMapper
    extends ExceptionMapperBase<javax.validation.ConstraintViolationException>
    Exception Mapper for ConstraintViolationException from Bean Validation API. Hibernate Validator, among others throw these exceptions. Adds 'violations' field into `application/problem` responses.
    • Constructor Detail

      • ConstraintViolationExceptionMapper

        public ConstraintViolationExceptionMapper()
    • Method Detail

      • toProblem

        protected HttpProblem toProblem​(javax.validation.ConstraintViolationException exception)
        Specified by:
        toProblem in class ExceptionMapperBase<javax.validation.ConstraintViolationException>