Robust error handling is crucial for any production-ready application. OurDocumentation Index
Fetch the complete documentation index at: https://tusharpamnani.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
ShardeumAPI class incorporates try...catch blocks around all network and wallet interactions.
Common Error Scenarios
- Wallet Not Found: Prompt user to install MetaMask or another wallet extension.
- Wallet Connection Rejected: User declined wallet connection; show a clear message.
- Transaction Rejected by User: User declined to sign the transaction; handle gracefully.
- RPC Errors: Inspect the
errorobject in the RPC response for details. - Network Errors: Catch and display network issues (e.g., endpoint down, no internet).