biocore / biocore/microsetta-interface
Revise client_impl.py's handling of private-api errors
- Dominant language
- Jinja
- Stars
- 1
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Per zoom discussion w @wasade @dhakim87 @AmandaBirmingham on 20200605:
1) Rewrite ApiRequest._check_response so that it raises custom exceptions for 401/403 and for other 400+s, and so that it returns only the successful api result (instead of a tuple)
* Note: the *one* case where the header is also needed is going to have to be handled somehow but we didn't decide yet how
2) Set up flask handlers for those custom exceptions to either redirect to home url (for 401/403) or return client error page (for all other 400+s)
3) Modify all code that calls ApiRequest get/post/etc to no longer do the `if needs_reroute then: return output` check after every such call--no longer needed!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.