-
Notifications
You must be signed in to change notification settings - Fork 91
fix: improve error message when persistTransaction times out. Increase default timeout to 130 seconds using Exponential Backoff #1316
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
Merged
Merged
Changes from 18 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
ec00fb2
Move getConfirmedTransaction logic to new public async function
MantisClone c95aef6
Adjust retry logic to make exponentialBackoffDelay more intuitive
MantisClone be2e95f
Update exponential backoff test
MantisClone 29d0aaa
Update exponential backoff test
MantisClone 5027177
Merge branch 'master' into update-default-http-config
MantisClone ae992bf
Merge branch 'master' into update-default-http-config
MantisClone bc405b3
Update retry test
MantisClone ca01298
Add note to README how to run tests for single package
MantisClone 077a91f
Update error message to be more descriptive
MantisClone 9ca0e96
Check that total elapsed time is as expected
MantisClone 3b7801c
Update test to match new error message
MantisClone 2a4a47b
Fix test according to CodeRabbit recommendation
MantisClone 497f6aa
Make instruction more specific with example package name
MantisClone 3d4b407
Fixes based on CodeRabbit comments
MantisClone d6339e2
Fix test per CodeRabbit comment
MantisClone 1fa766b
Fix test
MantisClone 7f2a5bd
update test
MantisClone e0c5e4b
Fix test
MantisClone 7b76550
Update defaults
MantisClone a246c91
Update error message
MantisClone b699fbd
Clean up error messages
MantisClone 3647631
Add a timeout to the Promise to ensure the test doesn't hang indefini…
MantisClone 9f81a7f
Simplify and clarify the error message for better readability
MantisClone 4aca871
Assert that it actually throws the error after it times out
MantisClone 70e4a90
Improve error message per CodeRabbit comment
MantisClone 9a8197c
Ensure status exists before checking for equality
MantisClone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,7 +61,7 @@ const retry = <TParams extends unknown[], TReturn>( | |
| setTimeout( | ||
| resolve, | ||
| retryDelay + | ||
| Math.min(maxExponentialBackoffDelay, exponentialBackoffDelay * 2 ** retry), | ||
| Math.min(maxExponentialBackoffDelay, (exponentialBackoffDelay / 2) * 2 ** retry), | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change adjusts the retry logic to make
|
||
| ), | ||
| ); | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this logic into a new
getConfirmedTransaction()function