sift icon indicating copy to clipboard operation
sift copied to clipboard

Cryptic error messages when filters param is not a key-value store

Open bunnrf opened this issue 7 months ago • 0 comments

With an empty filters param, Sift encounters:

"undefined method `[]' for nil:NilClass (NoMethodError filter_params[filter.validation_field] && filter.custom_validate"

And trace points to: lib/sift/filter_validator.rb:33 in `has_custom_validation?'

Similar errors when filters is something else.

Example query strings: ?filters ?filters=5

I expected an error message similar to the validation error messages Sift returns normally.

bunnrf avatar May 08 '25 18:05 bunnrf