Skip to main content

assert_json_rpc_success

Function assert_json_rpc_success 

Source
pub fn assert_json_rpc_success(response: &JsonRpcResponse)
Expand description

Validates that a JSON-RPC response indicates success.

§Panics

Panics if the response has an error.

§Example

let response = JsonRpcResponse::success(RequestId::Number(1), json!({}));
assert_json_rpc_success(&response);