Error thrown from EtherscanProvider.call via FallbackProvider not catchable
See original GitHub issueWhen the FallbackProvider.call
invokes EtherscanProvider.call
, the error thrown (https://github.com/ethers-io/ethers.js/blob/master/providers/etherscan-provider.js#L209) isn’t catchable because the setTimeout
has the error thrown on a different async stack: https://github.com/ethers-io/ethers.js/blob/master/providers/fallback-provider.js#L103.
If EtherscanProvider.call instead returns Promise.reject(...)
, it works as expected.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Providers — ethers.js 4.0.0 documentation
A Provider abstracts a connection to the Ethereum blockchain, for issuing queries and sending signed state changing transactions. The EtherscanProvider and ...
Read more >Logging - Ethers.js
Create a new logger which will include version in all errors thrown. ... This may occur when calling a method on a sub-class...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This has been published to
4.0.46
. Try it out and let me know if you have any problems. 😃Yeah, exactly what I was trying… It has to fail in a weird way and not on the first run (otherwise it fails in that async loop). It’s ok, I just hacked in some things directly to force it to fail. 😃
The fixes are in, but I’m looking through for other low-hanging fruit, since it takes about an hour for the tests to run and do all the admin tasks to cut a release. I’ll update this ticket when it is published to npm.