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

Improve error handling on routes and tasks #58

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nbarnabee
Copy link
Collaborator

@nbarnabee nbarnabee commented Mar 25, 2023

In the course of investigating T333016 I realized that my error handling on the API routes was extremely haphazard. I've now wrapped all of the routes in try/except blocks.

There is still much room for improvement, however; right now I'm only looking for the "catch-all" error SQLAlchemyError, and my handling of it is "minimal," to put it kindly.

I also made some tweaks to how the async tasks handle errors (though I'm finding it difficult to test my changes) and updated their results to better indicate what's happening.

@nbarnabee nbarnabee changed the title Improve error handling on routes Improve error handling on routes and tasks Mar 26, 2023
Removed extraneous print() messages
Clarified results so that the workflow is clearer
Attempted to catch additional exceptions on db update failure
@nbarnabee nbarnabee force-pushed the improve_error_handling branch from ec1edf6 to e5225b9 Compare March 26, 2023 11:27
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

Successfully merging this pull request may close these issues.

1 participant