Class ConstraintViolationExceptionMapper

java.lang.Object
io.jans.fido2.service.exception.ConstraintViolationExceptionMapper
All Implemented Interfaces:
jakarta.ws.rs.ext.ExceptionMapper<jakarta.validation.ConstraintViolationException>

@ApplicationScoped @Provider public class ConstraintViolationExceptionMapper extends Object implements jakarta.ws.rs.ext.ExceptionMapper<jakarta.validation.ConstraintViolationException>
Maps bean-validation failures (e.g. a missing/null request body annotated with @NotNull) to the FIDO2 conformance failure envelope. Without this, an empty body yields a default container 400 whose shape the conformance suite rejects.
  • Constructor Details

    • ConstraintViolationExceptionMapper

      public ConstraintViolationExceptionMapper()
  • Method Details

    • toResponse

      public jakarta.ws.rs.core.Response toResponse(jakarta.validation.ConstraintViolationException ex)
      Specified by:
      toResponse in interface jakarta.ws.rs.ext.ExceptionMapper<jakarta.validation.ConstraintViolationException>