Get more detailed error message on transaction failure ("Internal JSON-RPC error" vs. "Code: -32000 Message: insufficient funds for gas * price + value") #3273
Unanswered
thatguyintech
asked this question in
Q&A
Replies: 1 comment
-
Are you using the latest ethers? Also when error is catched, the Ethers is a modular lib, it makes it easy to change functionality into a custom one. Hence it requires every module to implement low-level sanity checks to ensure it's working correctly. Because of that the error that bubbles up at the top might not be the most helpful error, but low-level errors must be available in the error object. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the Feature
Is there a way to pipe the more detailed error code back from the failed transaction response? Basically to have ethers.js return a more detailed response string:
https://ethereum.stackexchange.com/questions/132563/how-to-get-detailed-error-message-from-alchemy-using-ethersjs
Alchemy should be returning the error code along with the error reasoning, as per the docs:
https://docs.alchemy.com/alchemy/apis/ethereum/eth-sendrawtransaction
Code Example
No response
Beta Was this translation helpful? Give feedback.
All reactions