Guard against invalid values when resolving pagination and sorting parameters from web requests [DATACMNS-408] #877
[example of invalid value]
Current implementation of the PageableHandlerMethodArgumentResolver is occurred IllegalArgumentException, and http response status is returned 500(Internal Server Error) on the default settings of SpringMVC.
Reference URL: #48
Backported to: 1.6.3 (Babbage SR2)
The text was updated successfully, but these errors were encountered:
Oliver Drotbohm commented
I fixed this by gracefully falling back to the defaults (in case of invalid page number and size) or ignoring invalid values (for sort properties). I think this makes more sense rather than telling the client that it was wrong and it has to repeat the request, which it would then do using the defaults anyway