Skip to content

fix: handle non-integer Retry-After values in GraphQL retry - #19

Closed
abhi-0203 wants to merge 1 commit into
Shopify:mainfrom
abhi-0203:fix-retry-after-value-error
Closed

abhi-0203 wants to merge 1 commit into
Shopify:mainfrom
abhi-0203:fix-retry-after-value-error

Conversation

@abhi-0203

Copy link
Copy Markdown

Summary

Fixes #18int(retry_after) raises ValueError when Retry-After header is a decimal (e.g., "2.0") or HTTP-date. This PR uses float() with a fallback to 1.0, covering both integer and decimal values. If parsing fails, it defaults to 1 second.

Changes

  • _handle_429_retry_sync: replaced int(retry_after) with float() + try/except
  • _handle_429_retry_async: same for async sleep

Testing

  • Verified with float("2.0") and float("2") both work.
  • Verified fallback when header is missing or invalid.

Related

Closes #18

@abhi-0203
abhi-0203 requested a review from a team as a code owner August 29, 2026 04:33
@github-actions

Copy link
Copy Markdown

Thanks for your interest. This repository does not accept contributions, so we've closed this PR.

To report a bug, request a feature, or share feedback, please post in the Shopify dev community forums

We triage in the forums, not in this repo. PRs and issues here are closed without review.

For more details see CONTRIBUTING.md.

@github-actions github-actions Bot closed this Aug 29, 2026
@github-actions github-actions Bot added the devtools-gardener Post the issue or PR to Slack for the gardener label Aug 29, 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.

int(retry_after) raises ValueError on a non-integer Retry-After value

1 participant