Error Handling
Most transaction failures fall into three categories: contract reverts, wallet rejections, and RPC errors. This page shows how to decode each type and respond correctly.Try it: see real errors
TheRunSnippet widget surfaces whatever the RPC returns — including failures. These two calls fail on purpose so you can see the exact error shape your code has to handle, live against Sei mainnet.
Contract Reverts
When a transaction reverts, the error contains the revert reason if the contract provides one.Simulating Before Sending
Always simulate write calls before submitting them. Simulation runs the call against current chain state and surfaces reverts before you spend gas:viem