Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKG -- [transport-http] Retry 429 responses #1362

Merged
merged 2 commits into from Aug 18, 2022

Conversation

jribbink
Copy link
Contributor

@jribbink jribbink commented Aug 17, 2022

Closes #1363

  • Retry 429 responses
  • Refactor http-request.js for readability
  • Handle empty response body without throwing JSON error

@jribbink jribbink requested a review from a team as a code owner August 17, 2022 23:17
@changeset-bot
Copy link

changeset-bot bot commented Aug 17, 2022

🦋 Changeset detected

Latest commit: 614b366

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@onflow/transport-http Minor
@onflow/sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jribbink jribbink force-pushed the jribbink/retry-too-many-requests branch from c934969 to 5d2e996 Compare August 17, 2022 23:39
Copy link
Member

@JeffreyDoyle JeffreyDoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Love the tests!

Comment on lines +95 to +98
spy.mockImplementation(async () => {
if (spy.mock.calls.length === 1) return mockBadResponse
return mockGoodResponse
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this!

@jribbink jribbink merged commit 9a1eb2b into master Aug 18, 2022
@jribbink jribbink deleted the jribbink/retry-too-many-requests branch August 18, 2022 18:16
@github-actions github-actions bot mentioned this pull request Sep 26, 2022
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.

[transport-http] Does not retry 429 response
2 participants