Skip to content

Fix Retry-After delay parsing - #3367

Draft
lizkenyon wants to merge 1 commit into
mainfrom
liz/fix-retry-after-delay
Draft

Fix Retry-After delay parsing#3367
lizkenyon wants to merge 1 commit into
mainfrom
liz/fix-retry-after-delay

Conversation

@lizkenyon

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Fixes #3364

Retry-After numeric values are expressed in seconds, but the shared retry helper passed them directly to millisecond-based setTimeout. This caused retries to run roughly 1,000 times too early. HTTP-date values also became NaN and retried almost immediately.

WHAT is this pull request doing?

  • Converts numeric Retry-After values, including fractional Shopify values, from seconds to milliseconds.
  • Supports HTTP-date delays and falls back to the existing retry delay for malformed values.
  • Caps parsed delays at the maximum safe JavaScript timer value to avoid overflow into an immediate retry.
  • Adds deterministic shared-client and Admin REST regression coverage.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have used pnpm changeset to create a draft changelog entry (do NOT update the CHANGELOG.md files manually)
  • I have added/updated tests for this change
  • I have documented new APIs/updated the documentation for modified APIs (no public API changes)

Verification

  • API-client build and test suites
  • GraphQL and Admin API client typechecks
  • Shopify API Admin/Storefront client tests
  • Prettier and git diff --check

@github-actions github-actions Bot added the devtools-gardener Post the issue or PR to Slack for the gardener label Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devtools-gardener Post the issue or PR to Slack for the gardener

Projects

None yet

Development

Successfully merging this pull request may close these issues.

retries: Retry-After is read as milliseconds but the header is in seconds

2 participants