IPC does not propagate errors at all
See original GitHub issuefor example a call like eth_sendRawTransaction might fail with {"jsonrpc":"2.0","id":42,"error":{"code":-32000,"message":"insufficient funds for gas * price + value"}}
instead, the call just returns a resolved Promise of undefined. this is because here: https://github.com/ethers-io/ethers.js/blob/7250cdcd31c08c88e97cb8ee1f8e808ea030f88d/src.ts/providers/ipc-provider.ts#L57
the .error property is just completely ignored and instead .result is returned (which does not exist on error).
This is a pretty bad issue because for some calls (like sendTransaction) whether or not the call succeeded is very significant.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
nodejs-api/ errors
Node.js supports several mechanisms for propagating and handling errors ... A generic JavaScript {Error} object that does not denote any ...
Read more >C# - Exception Propagation Issue in AsyncCallback
There is no 'propagation', there is no code to propagate the exception to. Your Connect() method has stopped running a long time ago....
Read more >Analyzing Error Propagation In Program Executions
the probability px for every possible source of errors x in the execution. There are three major issues in addressing this simpler problem....
Read more >Dealing with Exceptions in AIDL - Classy Code Blog
An obvious limitation is that exceptions are not propagated over the IPC boundary. The only exception the client of a bound service is ......
Read more >Propagation of Error - Chemistry LibreTexts
Every measurement has an air of uncertainty about it, and not all uncertainties are equal. Therefore, the ability to properly combine ...
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
Thank you!
Code looks good I think. I’ll reopen this if i encounter issues when I try again (in a few days).
You are absolutely correct.
I’ve reproduced this and am working on a fix to process errors the same way the
JsonRpcProvider
does.