Skip to content

Preserve Retry-After on SDK rate limit errors#1353

Open
RitwijParmar wants to merge 1 commit into
e2b-dev:mainfrom
RitwijParmar:codex/e2b-retry-after-rate-limits
Open

Preserve Retry-After on SDK rate limit errors#1353
RitwijParmar wants to merge 1 commit into
e2b-dev:mainfrom
RitwijParmar:codex/e2b-retry-after-rate-limits

Conversation

@RitwijParmar
Copy link
Copy Markdown

Summary

  • preserve Retry-After on 429 errors across the Python API client, Python envd API, JS API client, and JS envd API
  • expose parsed retry timing plus the raw Retry-After header on RateLimitException/RateLimitError
  • add focused Python and Vitest coverage for both API and envd exception paths

Closes #1325.

Validation

  • PYTHONPATH=packages/python-sdk /Users/ritwij/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/bin/python3 -m pytest packages/python-sdk/tests/test_retry_after_rate_limit.py
  • pnpm --filter ./packages/js-sdk exec vitest run tests/api/handleApiError.test.ts tests/envd/api.test.ts
  • pnpm --filter ./packages/js-sdk run typecheck
  • /Users/ritwij/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/bin/python3 -m compileall -q packages/python-sdk/e2b packages/python-sdk/tests/test_retry_after_rate_limit.py
  • /Users/ritwij/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/bin/python3 -m ruff check packages/python-sdk/e2b/api/init.py packages/python-sdk/e2b/envd/api.py packages/python-sdk/e2b/exceptions.py packages/python-sdk/e2b/rate_limit.py packages/python-sdk/tests/test_retry_after_rate_limit.py
  • pnpm --filter ./packages/js-sdk exec prettier --check src/api/index.ts src/envd/api.ts src/errors.ts tests/api/handleApiError.test.ts tests/envd/api.test.ts
  • git diff --check

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 26, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @RitwijParmar on file. You can sign our CLA at https://e2b.dev/docs/cla . Once you've signed, post a comment here that says '@cla-bot check'

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 26, 2026

⚠️ No Changeset found

Latest commit: c239d10

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

Python and JS SDKs — 429 WAIT signal lost at exception boundary, no Retry-After

1 participant