Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 62
Refactors test_routes as a separate module#266
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
b19e76cc8caab00d64796edd3af017dfb043a20cef9ab7a3bdb97b973c8b74f5ad3740c7bf88928a48b8File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -120,7 +120,7 @@ def standardize_response(payload={}, status_code=200, version=LATEST_API_VERSION | ||
| elif not data: | ||
| # 500 Error case -- Something went wrong. | ||
| message = msg_map.get(500) | ||
| resp["errors"] = {'errors': {"server-error": {"message": message}}} | ||
| resp["errors"] = {"server-error": {"message": message}} | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixing these tests to use a standardized utility function to check the responses was really good, because it caught this issue. A frontend would not have been able to parse correctly | ||
| resp["status_code"] = 500 | ||
| resp["status"] = err_map.get(500) | ||
| else: | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -14,4 +14,3 @@ prometheus_client==0.7.1 | ||
| uWSGI==2.0.18 | ||
| py-healthcheck==1.9.0 | ||
| bandit==1.5.1 | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only status code that returns an "invalid-*" response is a 422. For all the rest of the routes, the error is the same as the status, which in the case of 401 is "Unauthorized". I feel this API change is necessary for consistency