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 ifExceptionMapperto send down a "400 Bad Request" response in the event that unmappable JSON is received.
-
-
Constructor Summary
Constructors Constructor Description JsonMappingExceptionMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponsetoResponse(JsonMappingException exception)Map an exception to aResponse.
-
-
-
Method Detail
-
toResponse
public Response toResponse(JsonMappingException exception)
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.
-
-