question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IPC does not propagate errors at all

See original GitHub issue

for 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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
phireskycommented, Jan 5, 2020

Thank you!

Code looks good I think. I’ll reopen this if i encounter issues when I try again (in a few days).

1reaction
ricmoocommented, Jan 3, 2020

You are absolutely correct.

I’ve reproduced this and am working on a fix to process errors the same way the JsonRpcProvider does.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found