Table of Contents

Class JsonRpcError

Namespace
StreamJsonRpc.Protocol
Assembly
StreamJsonRpc.dll

Describes the error resulting from a JsonRpcRequest that failed on the server.

[DataContract]
[GenerateShape]
[MessagePackConverter(typeof(NerdbankMessagePackFormatter.JsonRpcErrorConverter))]
public class JsonRpcError : JsonRpcMessage, IJsonRpcMessageWithId
Inheritance
JsonRpcError
Implements
Derived
Inherited Members

Properties

DebuggerDisplay

Gets the string to display in the debugger for this instance.

protected string DebuggerDisplay { get; }

Property Value

string

Error

Gets or sets the detail about the error.

[DataMember(Name = "error", Order = 2, IsRequired = true)]
[JsonPropertyName("error")]
[JsonPropertyOrder(2)]
[JsonRequired]
[PropertyShape(Name = "error", Order = 2)]
public JsonRpcError.ErrorDetail? Error { get; set; }

Property Value

JsonRpcError.ErrorDetail

Id

Gets or sets an identifier established by the client if a response to the request is expected.

[Obsolete("Use RequestId instead.")]
[IgnoreDataMember]
[JsonIgnore]
[PropertyShape(Ignore = true)]
public object? Id { get; set; }

Property Value

object

A string, an int, a long, or null.

RequestId

Gets or sets an identifier established by the client if a response to the request is expected.

[DataMember(Name = "id", Order = 1, IsRequired = true, EmitDefaultValue = true)]
[JsonPropertyName("id")]
[JsonPropertyOrder(1)]
[JsonRequired]
[PropertyShape(Name = "id", Order = 1)]
public RequestId RequestId { get; set; }

Property Value

RequestId

Methods

ToString()

public override string ToString()

Returns

string