Class JsonMappingExceptionMapper
java.lang.Object
com.fasterxml.jackson.jakarta.rs.base.JsonMappingExceptionMapper
- All Implemented Interfaces:
ExceptionMapper<JsonMappingException>
public class JsonMappingExceptionMapper
extends Object
implements ExceptionMapper<JsonMappingException>
Implementation if
ExceptionMapper to send down a "400 Bad Request"
response in the event that unmappable JSON is received.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontoResponse(JsonMappingException exception) Map an exception to aResponse.
-
Constructor Details
-
JsonMappingExceptionMapper
public JsonMappingExceptionMapper()
-
-
Method Details
-
toResponse
Description copied from interface:ExceptionMapperMap an exception to aResponse. Returningnullresults in aResponse.Status.NO_CONTENTresponse. Throwing a runtime exception results in aResponse.Status.INTERNAL_SERVER_ERRORresponse.- Specified by:
toResponsein interfaceExceptionMapper<JsonMappingException>- Parameters:
exception- the exception to map to a response.- Returns:
- a response mapped from the supplied exception.
-