Skip to content

fix(api): Support HTTP-date Retry-After in rate limit handling#1858

Merged
ryanio merged 1 commit intoProjectOpenSea:mainfrom
kinderjoypresents:fix/retry-after-http-date
Jan 14, 2026
Merged

fix(api): Support HTTP-date Retry-After in rate limit handling#1858
ryanio merged 1 commit intoProjectOpenSea:mainfrom
kinderjoypresents:fix/retry-after-http-date

Conversation

@kinderjoypresents
Copy link
Contributor

Motivation

Some APIs return Retry-After as an HTTP-date (RFC 7231) rather than delta-seconds. The current implementation only supports numeric values, which can lead to missing or incorrect retry delays when clients are rate-limited.

Solution

Extend _parseRetryAfter to support both delta-seconds and HTTP-date formats. When an HTTP-date is provided, compute the number of seconds until the retry time. Add unit tests to cover the HTTP-date parsing and past-date behavior.

@kinderjoypresents kinderjoypresents changed the title fix(api): support etry-fter -date header fix(api): Support HTTP-date Retry-After in rate limit handling Jan 14, 2026
@ryanio
Copy link
Collaborator

ryanio commented Jan 14, 2026

thx!

@ryanio ryanio merged commit 3a1936f into ProjectOpenSea:main Jan 14, 2026
2 checks passed
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