Class GenericUncaughtJerseyExceptionMapper<T extends jakarta.ws.rs.WebApplicationException,E>

java.lang.Object
fr.paris.lutece.plugins.rest.service.mapper.GenericUncaughtJerseyExceptionMapper<T,E>
Type Parameters:
T - The sub-class of WebApplicationException to catch
E - The entity type wanted in the Response
All Implemented Interfaces:
jakarta.ws.rs.ext.ExceptionMapper<T>
Direct Known Subclasses:
UncaughtJerseyExceptionMapper

public abstract class GenericUncaughtJerseyExceptionMapper<T extends jakarta.ws.rs.WebApplicationException,E> extends Object implements jakarta.ws.rs.ext.ExceptionMapper<T>
Generic REST exception mapper, implementing ExceptionMapper, used to convert uncaught REST exceptions to a proper Response to return.
To implement your own in a Lutece plugin or module using lutece-rest-plugin-rest, extend this class, annotate it with Provider.
  • Constructor Details

    • GenericUncaughtJerseyExceptionMapper

      public GenericUncaughtJerseyExceptionMapper()
  • Method Details

    • toResponse

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