Share via


JsonRpc.GetErrorDetailsDataType(JsonRpcError) Method

Definition

Determines the type that the Data object should be deserialized to for an incoming JsonRpcError message.

protected virtual Type? GetErrorDetailsDataType (StreamJsonRpc.Protocol.JsonRpcError error);
abstract member GetErrorDetailsDataType : StreamJsonRpc.Protocol.JsonRpcError -> Type
override this.GetErrorDetailsDataType : StreamJsonRpc.Protocol.JsonRpcError -> Type
Protected Overridable Function GetErrorDetailsDataType (error As JsonRpcError) As Type

Parameters

error
JsonRpcError

The received error message.

Returns

The type, or null if the type is unknown.

Remarks

The default implementation matches what CreateErrorDetails(JsonRpcRequest, Exception) does by assuming that the Data object should be deserialized as an instance of CommonErrorData. However derived types can override this method and use Code or other means to determine the appropriate type.

Applies to