Skip to main content
Version: 4.x

DarkWS.Client.DarkWsResponseException

DarkWS.Client​

DarkWS.Client​

DarkWsResponseException Class​

A controlled server error. Payloads are excluded from the exception message.

public sealed class DarkWsResponseException : System.Exception

Inheritance System.Object → System.Exception → DarkWsResponseException

Constructors​

DarkWsResponseException(string, Nullable<JsonElement>, string, string) Constructor​

Creates a correlated server error with independently owned JSON data.

public DarkWsResponseException(string code, System.Nullable<System.Text.Json.JsonElement> errorData, string requestId, string action);

Parameters​

code System.String

errorData System.Nullable<System.Text.Json.JsonElement>

requestId System.String

action System.String

Properties​

DarkWsResponseException.Action Property​

Requested action.

public string Action { get; }

Property Value​

System.String

DarkWsResponseException.Code Property​

Server error code, possibly empty.

public string Code { get; }

Property Value​

System.String

DarkWsResponseException.ErrorData Property​

Optional server error data, independent of receive buffers.

public System.Nullable<System.Text.Json.JsonElement> ErrorData { get; }

Property Value​

System.Nullable<System.Text.Json.JsonElement>

DarkWsResponseException.RequestId Property​

Correlated request identifier, or empty for a text system command.

public string RequestId { get; }

Property Value​

System.String