You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the bug? lightwalletd appears to be directly propagating RPC errors from zcashd and zebra, instead of reinterpreting them as the correct GRPC error types.
Here is an example of a grpcurl session:
~/work/lightwalletd on ᚠfix/get_transaction_notfound [$] via 🐹 v1.22.2 on ☁️ [email protected](us-east1)
✗ grpcurl -d @ na-lax.zcashd.zec.rocks:443 cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTransaction <<EOM
{"hash": "OVmYYbd17odbutVyi9YaHZqAbyBzixVG6q/wTdwgEFM="}
EOM
ERROR:
Code: Unknown
Message: -5: No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
~/work/lightwalletd on ᚠfix/get_transaction_notfound [$] via 🐹 v1.22.2 on ☁️ [email protected](us-east1)
✗ grpcurl -d @ zec.rocks:443 cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTransaction <<EOM
{"hash": "OVmYYbd17odbutVyi9YaHZqAbyBzixVG6q/wTdwgEFM="}
EOM
ERROR:
Code: Unknown
Message: 0: Transaction not found
In general, the error codes from zcashd rpc methods should be interrogated and mapped to the corresponding GRPC error codes when possible; 2: Unknown should be used only as a last resort.
The text was updated successfully, but these errors were encountered:
What is the bug?
lightwalletd
appears to be directly propagating RPC errors fromzcashd
andzebra
, instead of reinterpreting them as the correct GRPC error types.Here is an example of a
grpcurl
session:In both cases, the error being returned should actually be code
5: NotFound
, as described in https://github.com/grpc/grpc/blob/master/doc/statuscodes.md#status-codes-and-their-use-in-grpcIn general, the error codes from zcashd rpc methods should be interrogated and mapped to the corresponding GRPC error codes when possible;
2: Unknown
should be used only as a last resort.The text was updated successfully, but these errors were encountered: