If an invalid value is passed to @RequestParam of type boolean, an IllegalArgumentException is thrown, which is indistinguishable from other IllegalArgumentException exceptions.
This then leads to a 500 InternalServerError, which is clearly incorrect, as it is a clear example of a 400(BadRequest) error.
example
@GetMapping
ResponseEntity<Void> getException(@RequestParam(name = "bool", defaultValue = "false", required = false) boolean bool) {
...
}
then pasing GET http://server:port/?bool=dummy
causes 500 internalServerError