telosnetwork / teloscan

Telos EVM block explorer for viewing blocks, transactions, contracts, staking, and more
https://teloscan.io
Apache License 2.0
22 stars 25 forks source link

Improve error reporting notification #684

Open pmjanus opened 6 months ago

pmjanus commented 6 months ago

On https://www.teloscan.io/address/0xD102cE6A4dB07D247fcc28F366A623Df0938CA9E?tab=contract and presumably all other contracts, if you connect your wallet and try to do a deposit, if your connected account has 0 balance you might get an error that says:

image

IF you click to see more details you will see: Error Details { "error": "{\"code\":-32603,\"message\":\"Internal JSON-RPC error.\",\"data\":{\"code\":3,\"message\":\"The sender address has a zero balance\",\"cause\":null}}" }

I want the user to have access to the error message on the initial notification of an error. Right now it is describing the state prior to the error but not the error message.

Viterbo commented 6 months ago

Personal notes: I created this Contract to generate errors easily. http://localhost:8080/address/0xc19a7E079B6661B3292B6B2476EcFa1311465C09?tab=contract