We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
File "akvo/rest/filters.py", line 61, in filter_queryset queryset = getattr(queryset, param)(**args_or_kwargs)
In the new API filtering, you get an internal server error when the query is not correct, e.g.: http://rsr.akvo.org/rest/v1/project/?filter={'incorrect':'code'}.
We should catch this and return the error message in a dict with detail as key. E.g. {detail: 'Related Field got invalid lookup: incorrect'}
{detail: 'Related Field got invalid lookup: incorrect'}
The text was updated successfully, but these errors were encountered:
[Fixes #2291] Pass FieldError on to API view
452bee2
[Fixes #2291] Code cleanup
06bed9d
Attempt API call with invalid filter. Error should now appear as "detail" in API view.
Sorry, something went wrong.
Merge pull request #2292 from akvo/#2291-invalid-api-filters
dd82b9c
[#2291] Catch invalid API filters and pass error on to user
damienallen
No branches or pull requests
In the new API filtering, you get an internal server error when the query is not correct, e.g.: http://rsr.akvo.org/rest/v1/project/?filter={'incorrect':'code'}.
We should catch this and return the error message in a dict with detail as key. E.g.
{detail: 'Related Field got invalid lookup: incorrect'}
The text was updated successfully, but these errors were encountered: