Class BadRequestExceptionMapper

java.lang.Object
ch.tocco.nice2.rest.core.spi.error.BadRequestExceptionMapper
All Implemented Interfaces:
jakarta.ws.rs.ext.ExceptionMapper<Exception>

@Component public class BadRequestExceptionMapper extends Object implements jakarta.ws.rs.ext.ExceptionMapper<Exception>
This exception mapper can be registered on all types of exceptions. The exception is mapped onto a 400 BAD REQUEST response.
  • Constructor Details

    • BadRequestExceptionMapper

      public BadRequestExceptionMapper()
  • Method Details

    • toResponse

      public jakarta.ws.rs.core.Response toResponse(Exception exception)
      Specified by:
      toResponse in interface jakarta.ws.rs.ext.ExceptionMapper<Exception>