Class RestExceptionMapper

java.lang.Object
com.atlassian.confluence.plugins.restapi.exceptions.RestExceptionMapper
All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<Exception>

public class RestExceptionMapper extends Object implements javax.ws.rs.ext.ExceptionMapper<Exception>
Converts ServiceExceptions into Responses containing RestErrors.

The conversion will be done automatically for any REST Resource that throws a ServiceException.

  • Constructor Details

    • RestExceptionMapper

      public RestExceptionMapper()
  • Method Details

    • toResponse

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