Skip to content

Add retry logic to _get_token to handle transient failures#705

Merged
BenGalewsky merged 2 commits intomasterfrom
704_retry_get_token
Feb 16, 2026
Merged

Add retry logic to _get_token to handle transient failures#705
BenGalewsky merged 2 commits intomasterfrom
704_retry_get_token

Conversation

@BenGalewsky
Copy link
Copy Markdown
Contributor

Fixes #704
Uses RetryTransport with 3 retries and exponential backoff on POST requests, preventing intermittent connection issues from failing token refresh.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.35%. Comparing base (df3d0b7) to head (9b482a7).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #705   +/-   ##
=======================================
  Coverage   98.35%   98.35%           
=======================================
  Files          30       30           
  Lines        2190     2191    +1     
=======================================
+ Hits         2154     2155    +1     
  Misses         36       36           
Flag Coverage Δ
unittests 98.35% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@gordonwatts gordonwatts left a comment

Choose a reason for hiding this comment

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

This looks ok to me - that said, the real issue isn't this - it is something wrong (likely) with the af. And this wasn't enough to fix it - in the sense that when it broke, it really broke for me and retries weren't helping.

But it certainly moved the error to another place in the library.

BenGalewsky and others added 2 commits February 16, 2026 10:19
Uses RetryTransport with 3 retries and exponential backoff on POST
requests, preventing intermittent connection issues from failing
token refresh.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@BenGalewsky BenGalewsky merged commit e761557 into master Feb 16, 2026
43 checks passed
@BenGalewsky BenGalewsky deleted the 704_retry_get_token branch February 16, 2026 17:57
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.

Wrap get_token call in Retry

3 participants