Class WebApplicationExceptionMapper

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

    public class WebApplicationExceptionMapper
    extends java.lang.Object
    implements javax.ws.rs.ext.ExceptionMapper<javax.ws.rs.WebApplicationException>
    Mapper for WebApplicationException, that comprises ClientErrorException and ServerErrorException.

    The mapper copies all header and creates a ApiError as message body with the exception message as title.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.ws.rs.core.Response toResponse​(javax.ws.rs.WebApplicationException exception)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WebApplicationExceptionMapper

        public WebApplicationExceptionMapper()
    • Method Detail

      • toResponse

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