Skip to content

Retry 429 and 529 with backoff #6

Open

Description

@VianneyMI

Context

TypeSafe documents 429 (rate limit) and 529 (overloaded) as retryable with exponential backoff. The clients raise RateLimitError and OverloadedError, which carry retry_after, and leave retrying to the caller. The default timeout is 30 seconds. The community client reports about 0.7 s for 3 questions and about 1.3 s for 400 questions, figures still to verify.

Goal

Retry transient failures inside the clients, with a timeout that fits measured latency.

Scope

  • A max_retries argument on Jev and AsyncJev.
  • Exponential backoff with jitter that honors retry_after.
  • Retries cover 429, 529, connection errors and timeouts. Other statuses are raised immediately.
  • Check the default 30 second timeout against measured latency.
  • Documentation states whether a retried request is billed again, once verified.

Design considerations

  • The default for max_retries is decided in this issue.
  • Both clients share one retry policy.

Completion criteria

  • Tests use httpx2.MockTransport sequences for success after retries and for exhausted retries, in both clients.

Activity

  1. added this to the v0.4: Operations milestone on Nov 8, 2026
  2. added
    enhancement
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions