Change response code for RequestRejectedException
Currently, when a request URL contains an unknown or potentially malicious string, Spring Security utilizes a HttpFirewall interface to reject the request with a org.springframework.security.web.firewall.RequestRejectedException. This exception will return as 500 Internal Server Error with the message "The request was rejected because the URL contained a potentially malicious String [string]." An example of such a string is "//".
Since this error is caused by a bad request from the user, the retuned response should instead be a 400 Client Error. Furthermore, keeping the response as a 500 error can impact the SLIs/SLOs of both SDMS and the Partition Service.
The purposed solution is to implement a RequestRejectedHandler to change the response code to 400 when there is a RequestRejectedException.