Wrong Error sent by ethers ("CALL_EXCEPTION" instead of "INSUFFICIENT_FUNDS") #4700
Unanswered
terry-daviass
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I'm encountering an issue where I'm not receiving the expected "INSUFFICIENT_FUNDS" error from ethers.js when attempting to send a transaction without adequate funds. Instead, I'm getting a "CALL_EXCEPTION" error without any revert data.
I'm experiencing an error handling inconsistency: previously, when sending a transaction without sufficient funds, I'd receive the "INSUFFICIENT_FUNDS" error (I don't clearly remember when it has changed). Now, I get a "CALL_EXCEPTION" error with no details. Interestingly, MetaMask correctly identifies and reports the issue, as shown in the screenshot. Moreover, if I reject the transaction in MetaMask, ethers returns the correct "user-rejected" error:
Here is my code:
Also, in case if I attach the right amount (less than I have on my MetaMask), everything works well.
Beta Was this translation helpful? Give feedback.
All reactions