Skip to content
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

Add handling for other requests exceptions #58

Open
amstilp opened this issue Mar 2, 2022 · 1 comment
Open

Add handling for other requests exceptions #58

amstilp opened this issue Mar 2, 2022 · 1 comment

Comments

@amstilp
Copy link
Contributor

amstilp commented Mar 2, 2022

Currently the code can handle errors from the AnVIL API (in the anvil-api-calls branch) but it does not handle other exceptions from the requests module, eg ConnectionError, TimeoutError, etc.

Some stack overflow posts about this:
https://stackoverflow.com/questions/48723711/python-mock-requests-post-to-throw-exception
https://stackoverflow.com/questions/36096379/python-requests-mock-doesnt-catch-timeout-exception
https://stackoverflow.com/questions/20885841/how-do-i-simulate-connection-errors-and-request-timeouts-in-python-unit-tests

@amstilp amstilp changed the title Add handling for other request exceptions Add handling for other requests exceptions Mar 2, 2022
@amstilp
Copy link
Contributor Author

amstilp commented Mar 15, 2022

Ideally this could be something resuable - a mixin or a decorator somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant