Skip to content

Feature/devexp 1394 python support http 429 with without retry after header#159

Merged
marcos-sinch merged 9 commits into
v2.1-nextfrom
feature/DEVEXP-1394-Python-Support-HTTP-429-with-without-retry-after-header
Jun 24, 2026
Merged

Feature/devexp 1394 python support http 429 with without retry after header#159
marcos-sinch merged 9 commits into
v2.1-nextfrom
feature/DEVEXP-1394-Python-Support-HTTP-429-with-without-retry-after-header

Conversation

@marcos-sinch

@marcos-sinch marcos-sinch commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Support HTTP 429 retries (with and without Retry-After header)

Adds automatic retries for rate-limited (429) responses in HTTPTransport, applied on both the normal and legacy paths and after token renewal. Retries are opt-in per endpoint: only endpoints that set HTTPEndpoint.IS_RETRYABLE = True are retried (False by default), so existing endpoints keep their current behaviour. Currently only OAuthEndpoint retries.

  • _send_with_retries retries up to MAX_RETRIES, if exhausted, it returns the last response to the caller.
  • Backoff respects the Retry-After header when present (seconds or HTTP date), otherwise it uses exponential backoff with full jitter.

Comment thread sinch/core/ports/http_transport.py Outdated
Comment thread tests/unit/test_http_transport.py
@marcos-sinch marcos-sinch requested a review from JPPortier June 24, 2026 14:23
JPPortier
JPPortier previously approved these changes Jun 24, 2026
Comment thread CHANGELOG.md Outdated
@marcos-sinch marcos-sinch merged commit e15b6ae into v2.1-next Jun 24, 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