Skip to content

sdk(ts): treat 429 as retryable to match the Go client #450

Description

@jfwoods

The two client SDKs now disagree on whether a 429 Too Many Requests is retryable:

// clients/go/errors.go:56
retryable := res.StatusCode >= 500 || res.StatusCode == http.StatusTooManyRequests
// clients/ts/src/errors.ts:19
const retryable = res.status === 503 || res.status >= 500;

So a rate-limited request auto-retries (honoring Retry-After, capped at 30s) in Go and fails immediately in TypeScript. The Go behavior was added during PR #434's review rounds; the TS client was never updated to match.

Go is the better behavior here — 429 is the canonical "back off and try again" response, and Retry-After is most often set on exactly that status. Bringing TS in line keeps the cross-SDK parity claim honest.

Fix: add res.status === 429 to the TS retryable predicate, confirm the TS retry path honors Retry-After with the same 30s clamp the Go client uses (clients/go/http.go:20), and add a wire-conformance case (clients/go/testdata/wire_cases.json) so the two clients can't drift again.

Found during the PR #434 pre-push docs review. docs/src/content/docs/sdk/go/reference.md documents the Go 429 row as retryable; the TS reference table should stay as-is until the code changes.

Activity

  1. coderabbitai commented on Aug 11, 2026

    @coderabbitai
    🔗 Related PRs

    #174 - refactor(table names): handle unsafe table names [closed]
    #434 - feat(sdk): add Go client SDK with full API-tree parity [open]
    #448 - fix(sdk): keep a baseURL path prefix instead of discarding it [open]


    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions