Deserializing @RequestBody with invalid datatype of json payload ends with HTTP status 500 instead of HTTP status 400 (changed behaviour observed since spring-web:5.2.4.RELEASE) #24689
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: duplicate
A duplicate of another issue
I've observed change of processing invalid payloads when deserializing in controller between versions spring-web:5.2.4.RELEASE and spring-web:5.2.3.RELEASE.
When calling REST API with json payload of incorrect field types, servlet responds with
request processing failure
as server error (500) instead of bad request as it worked till release 5.2.4.Example, dto with getter:
In controller:
Invalid json payload (Integer expected, but passed value is out of int range)
API call ends with internal server error (stacktrace with exception details below):
The text was updated successfully, but these errors were encountered: