Skip to content

retry on transient failures - #513

Merged
korbinib merged 1 commit into
mainfrom
dev-autocomplete-retry
Jun 22, 2026
Merged

retry on transient failures#513
korbinib merged 1 commit into
mainfrom
dev-autocomplete-retry

Conversation

@korbinib

@korbinib korbinib commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator
  • retry on transient failures (HTTP 429/500/502/503/504 and connection-level errors like timeouts/dropped connections), but do not retry definitive errors like 404.
  • Polite backoff
  • User agent
  • AUTOCOMPLETE_MAX_RETRIES env var (default 4)

trade-off: if one of the API endpoints is entirely down there is now ~15s retrying before giving up, vs. failing fast before - considered acceptable, since we run this asynchronously


📚 Documentation preview 📚: https://databank--513.org.readthedocs.build/

@korbinib
korbinib requested a review from mdondrup June 22, 2026 09:24

@mdondrup mdondrup left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks like a robust improvement. I think we may need to reconsider timeouts and retries in case it doesn't work. On the other hand, I think it isn't necessary to overthink it and adapt and fine-tune our service to compensate for the deficiencies of another.

@korbinib
korbinib merged commit 0f05a72 into main Jun 22, 2026
6 checks passed
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.

2 participants