Skip to main content

jsonrpc_error

Function jsonrpc_error 

Source
pub fn jsonrpc_error(
    id: Option<&Value>,
    code: i32,
    message: impl Into<String>,
) -> Value
Expand description

Build a JSON-RPC 2.0 error response. Per JSON-RPC 2.0 spec, omits id field when it’s null or absent.