I have a leisure web service created using Spring Boot.I can handle all exceptions that arise due to my code, but suppose the json object that the client messages are not compatible with the object that I want to desrialize it with , I get
"timestamp": 1498834369591,
"status": 400,
"error": "Bad Request",
"exception": "org.springframework.http.converter.HttpMessageNotReadableException",
"message": "JSON parse error: Can not deserialize value
I wanted to know if there is a way that for this exception I can provide the client with a custom exception message. I am not sure how to handle this error.
source
share