Request: ``` /some_controller?limit=10&page=1 ``` Error: ``` undefined method `each_pair' for "1":String Did you mean? each_char ``` The error comes from here: ``` # graphiti/query.rb def pagination @pagination ||= begin {}.tap do |hash| (@params[:page] || {}).each_pair do |name, value| ``` Would you accept a pull request to handle that gracefully?
Activity
richmolj commentedon Mar 24, 2021
To throw a better error? Absolutely!
fmluizao commentedon Mar 24, 2021
Which kind of error should we throw? Some kind of schema error?
richmolj commentedon Mar 24, 2021
I think a
Graphiti::Errors::InvalidRequest. In fact this is what we throw for writes, and have validator classes for writes https://github.com/graphiti-api/graphiti/tree/master/lib/graphiti/request_validatorsIdeally we'd do the something similar for reads (already runs through a validator and does nothing actually - https://github.com/graphiti-api/graphiti/blob/master/lib/graphiti/request_validators/validator.rb#L17)
fix: reject invalid page parameters (#537)
1.13.3 CHANGELOG [skip ci]
github-actions commentedon Aug 9, 2026
🎉 This issue has been resolved in version 1.13.3 🎉
The release is available on:
v1.13.3Your semantic-release bot 📦🚀
2.0.0-beta.6 CHANGELOG [skip ci]
github-actions commentedon Aug 9, 2026
🎉 This issue has been resolved in version 2.0.0-beta.6 🎉
The release is available on:
v2.0.0-beta.6Your semantic-release bot 📦🚀
2.0.0-beta.8 CHANGELOG [skip ci]
github-actions commentedon Aug 10, 2026
🎉 This issue has been resolved in version 2.0.0-beta.8 🎉
The release is available on:
v2.0.0-beta.8Your semantic-release bot 📦🚀
2.0.0 CHANGELOG [skip ci]
github-actions commentedon Sep 1, 2026
🎉 This issue has been resolved in version 2.0.0 🎉
The release is available on:
v2.0.0Your semantic-release bot 📦🚀
github-actions commentedon Sep 4, 2026
🎉 This issue has been resolved in version 1.13.3 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
fix: reject invalid page parameters (graphiti-api#537)