Skip to content
Meshline
SDK 1.1.0 · TypeView source on GitHub

Developer guide · API index

Members on this page

Meshline.Sdk

Meshline.Models.Protocol

RelayError Class

Contains a symbolic relay error code, diagnostic message, and optional structured details.

public sealed record RelayError : Meshline.Models.Protocol.ProtocolModel, System.IEquatable<Meshline.Models.Protocol.RelayError>

Inheritance System.Object → ProtocolModel → RelayError

Implements System.IEquatable<RelayError>

Properties

RelayError.Code Property

The symbolic protocol error code, such as rate_limited.

public string Code { get; init; }

Property Value

System.String

RelayError.Data Property

Optional structured error details, with JSON values cloned on assignment.

public System.Collections.Immutable.ImmutableDictionary<string,System.Text.Json.JsonElement>? Data { get; init; }

Property Value

System.Collections.Immutable.ImmutableDictionary<System.String,System.Text.Json.JsonElement>

RelayError.Message Property

The relay's human-readable error description.

public string Message { get; init; }

Property Value

System.String

Methods

RelayError.GetRetryAfter() Method

Reads a nonnegative retry delay from a rate-limit error, in seconds.

public System.Nullable<long> GetRetryAfter();

Returns

System.Nullable<System.Int64>
The retry delay in seconds, or null when no applicable hint is present.

Exceptions

System.Text.Json.JsonException
The applicable retry hint is not a nonnegative integer.

RelayError.GetRpcErrorCode() Method

Maps the symbolic relay error code to its JSON-RPC numeric code when known.

public System.Nullable<long> GetRpcErrorCode();

Returns

System.Nullable<System.Int64>
The known JSON-RPC error number, or null for an unknown symbolic code.

RelayError.IsDefinitiveRejection() Method

Determines whether the relay error proves that the submitted operation was rejected.

public bool IsDefinitiveRejection();

Returns

System.Boolean
true if the error is a known definitive rejection; otherwise, false.