Skip to content

fix: respect disabled rate limit retries - #108

Open
pcbeingused333 wants to merge 1 commit into
getlago:mainfrom
pcbeingused333:fix/disable-rate-limit-retries
Open

pcbeingused333 wants to merge 1 commit into
getlago:mainfrom
pcbeingused333:fix/disable-rate-limit-retries

Conversation

@pcbeingused333

Copy link
Copy Markdown

Respect retryOnRateLimit: false when handling HTTP 429 responses.

The wrapper throws LagoRateLimitError for a 429 response, then catches that same error and continues the retry loop even when retries are disabled. Check the retry option in the catch path so the error propagates after the first request.

Extend the existing no-retry test with a request counter asserting exactly one request. The existing maxRetries test continues to cover enabled retries.

Testing: the rate limit test file reports 24 passed and 1 failed on main (four requests instead of one), then 25 passed with the fix. Deno format and lint checks pass for both changed files. Tests use deno test --no-check tests/rate_limit.test.ts: the command without --no-check fails with TS2339/TS7006 in the generated OpenAPI client under Deno 2.9.8.

AI disclosure: This change and its tests were prepared with assistance from OpenAI Codex.

@cla-check-bot

cla-check-bot Bot commented Nov 15, 2026

Copy link
Copy Markdown

Welcome back, @pcbeingused333!

It looks like we still need your FLA signature on file. Please sign it here:

Sign the FLA

Once signed, this PR will be automatically updated.

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.

1 participant