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:
Referenced from: commits ac1d2d9, fa3e9bd
1 votes, 5 watchers
Daniel Robert opened SPR-7439 and commented
When utilizing a
@Controllermethod with annotation@RequestBodyand '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:
@RequestBodymarshalling throws java.io.EOFException when body is missingReferenced from: commits ac1d2d9, fa3e9bd
1 votes, 5 watchers