Skip to content

Comments

Improve i18n retry logic for rate-limited requests (HTTP 429)#53

Merged
redscar merged 5 commits intomainfrom
fix/i18n_429_error
Feb 20, 2026
Merged

Improve i18n retry logic for rate-limited requests (HTTP 429)#53
redscar merged 5 commits intomainfrom
fix/i18n_429_error

Conversation

@redscar
Copy link
Contributor

@redscar redscar commented Feb 20, 2026

Improve the pup i18n command’s retry behavior when hitting WordPress.org rate limits (HTTP 429).

Previously, retries treated all failures the same, which could cause repeated rapid requests during rate limiting. This update introduces smarter handling for 429 responses while keeping the original retry flow intact for all other errors.

@redscar redscar requested a review from dpanta94 February 20, 2026 15:05
@redscar redscar self-assigned this Feb 20, 2026
@redscar redscar requested a review from dpanta94 February 20, 2026 15:31
@redscar redscar merged commit 97d3b7f into main Feb 20, 2026
2 checks passed
@redscar redscar deleted the fix/i18n_429_error branch February 20, 2026 15:42
d4mation added a commit that referenced this pull request Feb 23, 2026
Replace parallel Promise.all downloads with sequential batch processing
and add smarter HTTP 429 rate-limit handling with exponential backoff.

- Add --delay and --batch-size CLI options
- Clamp --retries to 1-5 range
- Use backoff multipliers [16, 31, 91, 151] for 429 responses
- Respect Retry-After header capped to backoff schedule
- Extract saveTranslationFile helper
- Add User-Agent header to all fetch requests
- Track failed downloads and return exit code 1 on any failure
- Add 429 recovery and exhaustion tests
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.

2 participants