Skip to content

RpcErrorObject

Namespace: E2E.Engine.Protocol

public sealed record RpcErrorObject : IEquatable<RpcErrorObject>

The error object of a failed JSON-RPC response. Upstream’s RpcErrorObject.

Inheritance: object

Implements: IEquatable<RpcErrorObject>

View source

public RpcErrorObject(int Code, string Message, JsonNode? Data = null)

The error object of a failed JSON-RPC response. Upstream’s RpcErrorObject.

Parameters

Name Type Description
Code int
Message string
Data JsonNode

public int Code { get; init; }

Value: int

public JsonNode? Data { get; init; }

Value: JsonNode

public string Message { get; init; }

Value: string

IsRpcErrorObject(JsonNode?, out RpcErrorObject)

Section titled “IsRpcErrorObject(JsonNode?, out RpcErrorObject)”
public static bool IsRpcErrorObject(JsonNode? value, out RpcErrorObject error)

Whether <code class=“paramref”>value</code> has the shape of a JSON-RPC error object, and reads it. Upstream’s isRpcErrorObject, which narrows the value where C# returns what it read.

Parameters

Name Type Description
value JsonNode
error RpcErrorObject

Returns: bool