hyperledger / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
432 stars 276 forks source link

Poor errors formatting #4974

Open 0x009922 opened 1 month ago

0x009922 commented 1 month ago

Description

tl;dr: Iroha has detailed errors internally, but when it comes to their formatting most of the details are dismissed.

In order for formatting to work properly, each separate Error in Iroha codebase must implement it properly and consistently with others. Since there are quite many Errors, I propose to significantly increase test coverage of their formatting.

Here is an example of this issue: #4973

Detailed error messages are very important for UX. Improving it should not be a breaking API change.

0x009922 commented 3 weeks ago

Just another case from users:

ERROR iroha_core::snapshot: Failed to create a snapshot of state error=Error (de)serializing World State View snapshot

We unfortunately will never know what actually happened, although all the details are there inside.