Method CreateResponseWithError
CreateResponseWithError(IJsonRpcRequest, Int32, String)
Declaration
public static JsonRpcResponse CreateResponseWithError(this IJsonRpcRequest request, int code, string message)
Parameters
Returns
| Type |
Description |
| JsonRpcResponse |
A JSON-RPC response with a matching ID that contains the provided error details. |
CreateResponseWithError(IJsonRpcRequest, Int32, String, Object)
Declaration
public static JsonRpcResponse CreateResponseWithError(this IJsonRpcRequest request, int code, string message, object data)
Parameters
| Type |
Name |
Description |
| IJsonRpcRequest |
request |
This IJsonRpcRequest instance. |
| Int32 |
code |
The JSON-RPC error code. |
| String |
message |
A short description String of the error. |
| Object |
data |
An optional primitive or structured value with additional information about the error.
|
Returns
| Type |
Description |
| JsonRpcResponse |
A JSON-RPC response with a matching ID that contains the provided error details. |
CreateResponseWithError(IJsonRpcRequest, JsonRpcError)
Declaration
public static JsonRpcResponse CreateResponseWithError(this IJsonRpcRequest request, JsonRpcError jsonRpcError)
Parameters
Returns
| Type |
Description |
| JsonRpcResponse |
A JSON-RPC response with a matching ID that contains the provided error details. |
CreateResponseWithError<T>(IJsonRpcRequest, Int32, String)
Declaration
public static JsonRpcResponse<T> CreateResponseWithError<T>(this IJsonRpcRequest request, int code, string message)
Parameters
Returns
| Type |
Description |
| JsonRpcResponse<T> |
A JSON-RPC response with a matching ID that contains the provided error details. |
Type Parameters
| Name |
Description |
| T |
The desired type of the reponse result. |
CreateResponseWithError<T>(IJsonRpcRequest, Int32, String, Object)
Declaration
public static JsonRpcResponse<T> CreateResponseWithError<T>(this IJsonRpcRequest request, int code, string message, object data)
Parameters
| Type |
Name |
Description |
| IJsonRpcRequest |
request |
This IJsonRpcRequest instance. |
| Int32 |
code |
The JSON-RPC error code. |
| String |
message |
A short description String of the error. |
| Object |
data |
An optional primitive or structured value with additional information about the error.
|
Returns
| Type |
Description |
| JsonRpcResponse<T> |
A JSON-RPC response with a matching ID that contains the provided error details. |
Type Parameters
| Name |
Description |
| T |
The desired type of the reponse result. |
CreateResponseWithError<T>(IJsonRpcRequest, JsonRpcError)
Declaration
public static JsonRpcResponse<T> CreateResponseWithError<T>(this IJsonRpcRequest request, JsonRpcError jsonRpcError)
Parameters
Returns
| Type |
Description |
| JsonRpcResponse<T> |
A JSON-RPC response with a matching ID that contains the provided error details. |
Type Parameters
| Name |
Description |
| T |
The desired type of the reponse result. |