pub fn create_error_response(
id: Option<JsonRpcId>,
code: i32,
message: &str,
description: &str,
) -> JsonRpcResponse<NetworkRpcResult>Expand description
Creates an error response following the JSON-RPC 2.0 specification.
§Arguments
id- The request ID from the original JSON-RPC requestcode- The error code (should follow JSON-RPC error code conventions)message- A short, human-readable error messagedescription- A more detailed description of the error
§Returns
Returns a JsonRpcResponse<NetworkRpcResult> containing the error details
and no result data.