Skip to main content

Handling Contract Errors

When calling contracts, a number of errors can occur.

Generally, it is the responsiblity of the wallet to handle all errors and display them to the user. That way, certain errors (eg. counter too low) can be handled directly and as an example, give the user the option to retry.

Wallets can optionally choose to relay the error messages back to the dApp. This is especially helpful if the contract call failed with an error specific to a certain contract. The simple contract page contains an example of how those error messages can be handled.