near-api-js
near-api-js copied to clipboard
fix: retry on HTTP 408 error
Motivation
When testing contracts with near-workspace, HTTP 408 error frequently crashes the tests. However this could be resolved by just retrying the request.
Description
Retry on http 408 error.
Checklist
- [ ] Read the contributing guidelines
- [ ] Commit messages follow the conventional commits spec
- [ ] Performed a self-review of the PR
- [ ] Added automated tests
- [ ] Manually tested the change
⚠️ No Changeset found
Latest commit: 3704ca2619a9e5852f012067c97c36fe31ddd799
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
@volovyks mind taking a look at this tiny PR?
the idea of retrying on 408 HTTP error looks reasonable to me, so I've made this code work without merge conflicts in https://github.com/near/near-api-js/pull/1205
I'd suggest closing this one so we don't leave it out of date