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

fix: for batch requests make sure all promises are complete (either fulfilled or rejected) #4118

Closed
wants to merge 0 commits into from

Conversation

marianogoldman
Copy link

In JsonRpcApiProvider, when processing the results, if one of the results is an error, then the loop exits prematurely and all the remaining promises are neither resolved nor rejected.

This PR marks error results as rejected promises, but continues processing all requests in the batch so all promises finish correctly (either fulfill or reject).

@ricmoo
Copy link
Member

ricmoo commented Jun 2, 2023

Good catch! I’ll get to it shortly. :)

@ricmoo ricmoo added bug Verified to be an issue. on-deck This Enhancement or Bug is currently being worked on. v6 Issues regarding v6 labels Jun 2, 2023
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this pull request Jan 14, 2024
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this pull request Jan 14, 2024
@ricmoo ricmoo removed the on-deck This Enhancement or Bug is currently being worked on. label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. v6 Issues regarding v6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants