public class JsonMappingExceptionMapper extends Object implements ExceptionMapper<JsonMappingException>
ExceptionMapper to send down a "400 Bad Request"
response in the event that unmappable JSON is received.
Note that Provider annotation was include up to
Jackson 2.7, but removed from 2.8 (as per [jaxrs-providers#22]
| Constructor and Description |
|---|
JsonMappingExceptionMapper() |
| Modifier and Type | Method and Description |
|---|---|
Response |
toResponse(JsonMappingException exception)
Map an exception to a
Response. |
public Response toResponse(JsonMappingException exception)
ExceptionMapperResponse. Returning
null results in a Response.Status.NO_CONTENT
response. Throwing a runtime exception results in a
Response.Status.INTERNAL_SERVER_ERROR response.toResponse in interface ExceptionMapper<JsonMappingException>exception - the exception to map to a response.Copyright © 2017 JBoss by Red Hat. All rights reserved.