@Provider public class WebApplicationExceptionMapper extends Object implements javax.ws.rs.ext.ExceptionMapper<javax.ws.rs.WebApplicationException>
ExceptionMapper for the WebApplicationException family of exceptions.
The intention of this exception mapper is to restructure the exceptions into a standard JSON format.
| Constructor and Description |
|---|
WebApplicationExceptionMapper() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
toResponse(javax.ws.rs.WebApplicationException exception)
Maps an unhandled
WebApplicationException to a Response. |
public javax.ws.rs.core.Response toResponse(javax.ws.rs.WebApplicationException exception)
WebApplicationException to a Response.toResponse in interface javax.ws.rs.ext.ExceptionMapper<javax.ws.rs.WebApplicationException>exception - the WebApplicationException that was not handledResponse object with a status of the WebApplicationException or 500
if the exception's response is null, 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.