Skip to content

fix: respect Retry-After header on 429 responses in facilitator client#1929

Open
natsukingly wants to merge 1 commit intox402-foundation:mainfrom
natsukingly:fix/retry-after-header
Open

fix: respect Retry-After header on 429 responses in facilitator client#1929
natsukingly wants to merge 1 commit intox402-foundation:mainfrom
natsukingly:fix/retry-after-header

Conversation

@natsukingly
Copy link
Copy Markdown

Summary

The HTTP facilitator client ignores the Retry-After header on 429 (Too Many Requests) responses, using fixed exponential backoff instead. This can cause unnecessary delays or premature retries.

Changes

  • Parse Retry-After header value (integer seconds) on 429 responses
  • Use the server-specified delay when available
  • Fall back to existing exponential backoff when Retry-After is absent or unparseable

Behavior

429 with Retry-After: 5  →  wait 5000ms
429 with Retry-After: 0  →  fall back to exponential backoff
429 without header       →  fall back to exponential backoff (unchanged)

Test plan

  • Full monorepo build passes
  • Verify retry behavior with mocked 429 responses

@github-actions github-actions bot added typescript sdk Changes to core v2 packages labels Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk Changes to core v2 packages typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant