Spring Boot WebFlux validation of invalid inputs. #30960
Labels
status: invalid
An issue that we don't feel is valid
theme: kotlin
An issue related to Kotlin support
I am building java application using Spring Boot 2.7.12
And I have very simpler REST API controller like that:
And the issue when I am making a regular regular request as expected, everything works fine:
$ curl http://localhost:8080/sample/echo?intValue=111 Return back: 111
However if I will enter non-numeric value, Spring Boot is crashing:
If it is non-valid input, it should rather be 400 Bad Requests, than 500 Internal errors, and such things should be handled by the framework.
We using the Spring Boot framework, because we need some framework that will handle all edge case scenarios with mapping of the HTTP request parameters to controller input arguments, and that obviously should be handled properly by the framework.
Could you please advise, how to handle such HTTP requests properly?
The text was updated successfully, but these errors were encountered: