Concordium / concordium-client

A command line client to interact with the concordium-node
Apache License 2.0
8 stars 6 forks source link

Improve error GRPC error reporting in the client. #47

Open abizjak opened 3 years ago

abizjak commented 3 years ago

We want to avoid calling the Haskell error in any circumstance on the client side, i.e., avoid printouts like concordium-client: user error ("gRPC error: Consensus didn't accept a transaction via RPC due to Stale")

abizjak commented 3 years ago

Example

concordium-client: RPC error: Cannot establish connection to GRPC endpoint.
CallStack (from HasCallStack):
  error, called at src/Concordium/Client/GRPC.hs:94:25 in concordium-client-1.1.1-1Thy12mrhjhLLvIg7dblCO:Concordium.Client.GRPC

that we should avoid.

abizjak commented 2 years ago

Can you please have a look @EmilLa1 at this after the changes in https://github.com/Concordium/concordium-node/pull/217/ ?

If it is a small fix we should do it, otherwise we can postpone it.

chrmatt commented 1 year ago

More generally, error messages should be improved and report the errors the node responds with in a more human readable way.

Example: When submitting a transaction with the clock of the system out-of-sync, concordium-client reports user error (gRPC error: Stale).

mh-concordium commented 1 year ago

It would be nice to improve the error message in the case if user tries to send transaction while the account doesn't have enough to cover transaction costs. concordium-client: user error (gRPC error: The sender did not have enough funds to cover the costs).

mh-concordium commented 1 year ago

It would be nice to improve the error messages in the case if user tries to send transaction with duplicated or too large nonce.

user error (gRPC error: Duplicate nonce)
user error (gRPC error: Nonce too large)
mh-concordium commented 1 year ago

It would be nice to improve the error message in the case if user tries to send transaction with wrong private key. concordium-client: user error (gRPC error: Verification failed)