@Provider public class FailureExceptionMapper extends Object implements javax.ws.rs.ext.ExceptionMapper<org.jboss.resteasy.spi.Failure>
ExceptionMapper for the Failure family of exceptions.
Failure is a family of exceptions that Resteasy will throw when errors occur
internally within the framework. The intention of this exception mapper is to restructure the
exceptions into a standard JSON format.
| Constructor and Description |
|---|
FailureExceptionMapper() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
toResponse(org.jboss.resteasy.spi.Failure exception)
Maps an unhandled
Failure to a Response. |
public javax.ws.rs.core.Response toResponse(org.jboss.resteasy.spi.Failure exception)
Failure to a Response.toResponse in interface javax.ws.rs.ext.ExceptionMapper<org.jboss.resteasy.spi.Failure>exception - the Failure exception that was not handledResponse object with status code of the Failure's response or the
error code if the response is null (defaults to 500 if the exception's response is null
and the error code is not a valid status code), a content-type of 'application/json', and
a JsonError entity containing details about the unhandled exception in JSON formatCopyright © 2020 Cerner Innovation, Inc.. All rights reserved.