Class ConstraintViolationExceptionMapper

java.lang.Object
io.quarkiverse.httpproblem.ExceptionMapperBase<jakarta.validation.ConstraintViolationException>
io.quarkiverse.httpproblem.validation.ConstraintViolationExceptionMapper
All Implemented Interfaces:
jakarta.ws.rs.ext.ExceptionMapper<jakarta.validation.ConstraintViolationException>

@Priority(5000) public final class ConstraintViolationExceptionMapper extends ExceptionMapperBase<jakarta.validation.ConstraintViolationException> implements jakarta.ws.rs.ext.ExceptionMapper<jakarta.validation.ConstraintViolationException>
Exception Mapper for ConstraintViolationException from Bean Validation API. Hibernate Validator, among others throw these exceptions. Adds 'violations' field into `application/problem` responses.
  • Field Details

    • HTTP_VALIDATION_PROBLEM_STATUS_CODE

      public static final String HTTP_VALIDATION_PROBLEM_STATUS_CODE
      APIResponse annotations' responseCode must be set according to the configuration, it can't be hardcoded as for other mappers. OpenApiProblemFilter handles this accordingly.
      See Also:
  • Constructor Details

    • ConstraintViolationExceptionMapper

      public ConstraintViolationExceptionMapper()
    • ConstraintViolationExceptionMapper

      @Inject public ConstraintViolationExceptionMapper(PostProcessorsRegistry postProcessorsRegistry, ProblemRuntimeFixedConfig config)
  • Method Details