Interface WebApplicationExceptionWrapper<T extends WebApplicationException>

    • Method Detail

      • wrap

        static WebApplicationException wrap​(WebApplicationException e)
        If the resteasy.original.webapplicationexception.behavior is set to true or the request is determined to not be a server side request, then the WebApplicationException passed in will be returned. If the property is not set to true and this is a server side request then the exception is wrapped and the response is sanitized.
        Parameters:
        e - the exception to possibly wrapped
        Returns:
        the wrapped exception or the original exception if the exception has already been wrapped the the wrapping feature is turned off
      • sanitize

        static Response sanitize​(Response response)
        Sanitizes the response by creating a new response with only the status code, allowed methods, entity and the media type. All other information is removed.
        Parameters:
        response - the response to sanitize.
        Returns:
        the new response
      • unwrap

        T unwrap()
        Returns the original, unwrapped, exception.
        Returns:
        the original exception