Use 400 Bad request instead of 500 when JSON payload is well formed but has an invalid structure [SPR-8476] #13122
When the JSON payload is well formed but contains like a property that cannot be mapped to the target bean a JsonMappingException is thrown and then catch by DefaultHandlerExceptionResolver resulting in a 500.
Unit test plus fix catching and wrapping the root exception JsonProcessingException can be found in the following patch.
Affects: 3.0.3, 3.1 M2
Referenced from: commits efaa941
The text was updated successfully, but these errors were encountered: