public interface WebApplicationExceptionWrapper<T extends WebApplicationException>
WebApplicationException
to be unwrapped.Modifier and Type | Method and Description |
---|---|
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.
|
T |
unwrap()
Returns the original, unwrapped, exception.
|
static WebApplicationException |
unwrap(WebApplicationException e)
Unwraps the exception if the passed in expression is a
WebApplicationExceptionWrapper . |
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. |
static WebApplicationException wrap(WebApplicationException e)
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.e
- the exception to possibly wrapstatic WebApplicationException unwrap(WebApplicationException e)
WebApplicationExceptionWrapper
. Otherwise
the exception passed in is returned.e
- the exception to unwrapWebApplicationExceptionWrapper
static Response sanitize(Response response)
response
- the response to sanitize.T unwrap()
Copyright © 2021 JBoss by Red Hat. All rights reserved.