Concordium / concordium-client

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

Ungraceful handling of error caused by querying old node #147

Open bisgardo opened 2 years ago

bisgardo commented 2 years ago

Bug Description

When calling GetBakerList on a node v3.0.2 (the version currently running on mainnet) where the call isn't valid, the resulting error message isn't helpful:

$ stack run concordium-client -- --grpc-ip=service.internal.mainnet.concordium.software raw GetBakerList
gRPC error: not enough bytes

If pointing at testnet (which is running v4.0.11), the call is valid:

$ stack run concordium-client -- --grpc-ip=service.internal.testnet.concordium.com raw GetBakerList
[
    0,
    1,
    2,
    ...
]

Steps to Reproduce

Call concordium-client raw GetBakerList against a pre-4.x.x node.

Expected Result

A message saying that the call isn't valid because the node version is too old.

Actual Result

A low-level gRPC error.

Versions

┆Issue is synchronized with this Jira Task by Unito

abizjak commented 2 years ago

This is related to the general issue #47

Errors are handled poorly in general.