inveniosoftware / react-searchkit

React component library for interacting with a REST API.
https://inveniosoftware.github.io/react-searchkit/
MIT License
78 stars 40 forks source link

handle malformed urls #161

Closed FlorianCassayre closed 3 years ago

FlorianCassayre commented 3 years ago
FlorianCassayre commented 3 years ago

I see, I was not 100% sure about this part but it can be changed for sure (raise an exception instead of filtering the invalid parameters). Or even better, have it as a configurable behaviour. One argument in favour of filtering was to be able to gracefully handle old urls after one of the parameter name has changed; or for instance if the allowed page sizes were updated. In any case the existing validation was incomplete and would let invalid values pass through, which we don't want for sure.

FlorianCassayre commented 3 years ago

Post-discussion: yes filter them, no need for config.