Skip to main content

rpc_arg_error_to_status

Function rpc_arg_error_to_status 

Source
fn rpc_arg_error_to_status(error: ErrorObjectOwned) -> Status
Expand description

Converts a JSON-RPC method error into a gRPC status, for a call whose arguments the client supplied and Zebra has not already validated.

zcashd reuses the same error codes for “no such thing” and “that argument is not valid”, so only the caller knows which it meant. Reporting a malformed address as NOT_FOUND, or a bad range as INTERNAL, blames the server for the client’s input.