I have a Dapp with smart a contract that has a revert function that can only happen in a specific case.

When the revert is triggered, Metamask shows the error like this:

enter image description here

Is there a way to "intercept" this error and display something else more user friendly?

2 Answers 2


No, Metamask doesn't give a way to replace the text in the hover box. However you can retrieve the failed transactions in your dapp, figure out why it failed, and tell the user that way.


You won't be able to edit the MetaMask error, however, in your front-end you should be able to detect the error and throw an error in a more user friendly way

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.