Closed
Description
Daniel Robert opened SPR-7439 and commented
When utilizing a @Controller
method with annotation @RequestBody
and 'application/json' content type with Jackson on the classpath, MappingJacksonHttpMessageConverter throws a 'JsonParseException' (subclass of IOException) when given invalid JSON.
According to AbstractHttpMessageConverter.readInternal()'s documentation, the HttpMessageNotReadableException exception is more appropriate for conversion errors.
The side effect of this is that DefaultHandlerExceptionResolver throws a 500 Internal Server Error instead of the expected 400 Bad Request.
Affects: 3.0.2
Issue Links:
- JSON (jackson) @RequestBody marshalling throws java.io.EOFException when body is missing [SPR-9238] #13876 JSON (jackson)
@RequestBody
marshalling throws java.io.EOFException when body is missing
Referenced from: commits ac1d2d9, fa3e9bd
1 votes, 5 watchers