Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Calais error handling #287

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

Calais error handling #287

wants to merge 2 commits into from

Conversation

cometman
Copy link
Contributor

Adding error handling to catch Calais errors nicely. This allows us to do different things based on Calais API errors (wait some time, notify the team, etc.)

attempts += 1
sleep 10
retry if attempts < 5
rescue RuntimeError => e
rescue RuntimeError => e # Do we still need this catch?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@knowtheory do we need this RuntimeError catch still? Was this exception used to catch errors if Calais received a request that was too large? If so, we have an exception that can handle this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cometman So long as the branch there is covered and that the content too large error is caught through other means we can remove it def.

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

Successfully merging this pull request may close these issues.

None yet

2 participants