EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.28k stars 3.6k forks source link

Error Handling #10219

Open jafri opened 4 years ago

jafri commented 4 years ago

I think eosjs needs a substantial update that provides clear error messages. Currently, it just passes nodeos errors on, but these could be substantially improved, especially in the case of CPU where the error is ambiguous and often incomprehensible to users.

jlamarr22 commented 4 years ago

I agree with you that there are some instances where it's difficult to figure out how to fix errors due to ambiguous messages.

Currently, it just passes nodeos errors on, but these could be substantially improved

This sounds like something that could be improved on nodeos. If we start translating error messages on the EOSJS side, then do we translate all of them? How do we draw the line between error messages we want to translate and ones we don't need to? It doesn't seem like this solution would solve the root cause of the issue.

If you have a set of specific scenarios that are causing strange error messages and reasons why they don't make sense to you -- I can reach out to others and see if they can be improved on the nodeos side.

jafri commented 4 years ago

@jlamarr22 the largest problems are around resource management. Error messages with clear actionable steps and helper information like "Stake 5 more EOS for TX to pass", are much needed.