-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent Server Error on API call with zero/negative page #463
Comments
As far as I can see only Also, as I went through the code, I noticed that the conversion to int is sometimes validated and sometimes it is not validated. The same validation problem applies to required and optional parameters and int ranges. I'm not sure whether there is generic way to implement pagination and what would be a sensible way for input validation (without doing it over and over again in each function). My question is whether we want to fix validation issues as we find them, just ignore them since a 500 is enough of an error message or think about a refactoring of the action API functions with a generic way of validating parameters. I consider this a UX problem because the API is such an important part of the CKAN interface. |
500 is a Server Error (which results in an admin email) which is not the case here. |
@domoritz As far as bad params ideally the api would give some useful errors if we can do that nicely. |
This issue will be part of #473 |
The following check was failing on the first load, so autozoom didn't work: https://github.com/okfn/recline/blob/3f4a30e054652d06b92cfe372ce66c8b5c79d4ca/src/view.map.js#L232 We are patching the local recline file but the same patch has already been submitted to the main recline repo: datopian/datahub#464
The following check was failing on the first load, so autozoom didn't work: https://github.com/okfn/recline/blob/3f4a30e054652d06b92cfe372ce66c8b5c79d4ca/src/view.map.js#L232 We are patching the local recline file but the same patch has already been submitted to the main recline repo: datopian/datahub#464
An API call like
/api/action/current_package_list_with_resources?limit=100&page=0
results in an uncaught Exception because the page parameter is not properly checked.The text was updated successfully, but these errors were encountered: