Can’t catch Web3.js’ contract error when calling a method and cancelling the transaction
I have a very simple React app that calls a Solidity smart contract’s method using Web3.js (4.3.2
) with some data coming from a form. I’m trying to catch errors while calling the contract method or sending the transaction, such as the user closing the wallet modal, in order to display an error message.