Share via


JsonRpc.CreateErrorDetails(JsonRpcRequest, Exception) Method

Definition

Creates the JsonRpcError.ErrorDetail to be used as the value for the error property to be sent back to the client in response to an exception being thrown from an RPC method invoked locally.

protected virtual StreamJsonRpc.Protocol.JsonRpcError.ErrorDetail CreateErrorDetails (StreamJsonRpc.Protocol.JsonRpcRequest request, Exception exception);
abstract member CreateErrorDetails : StreamJsonRpc.Protocol.JsonRpcRequest * Exception -> StreamJsonRpc.Protocol.JsonRpcError.ErrorDetail
override this.CreateErrorDetails : StreamJsonRpc.Protocol.JsonRpcRequest * Exception -> StreamJsonRpc.Protocol.JsonRpcError.ErrorDetail
Protected Overridable Function CreateErrorDetails (request As JsonRpcRequest, exception As Exception) As JsonRpcError.ErrorDetail

Parameters

request
JsonRpcRequest

The request that led to the invocation that ended up failing.

exception
Exception

The exception thrown from the RPC method.

Returns

The error details to return to the client. Must not be null.

Remarks

This method may be overridden in a derived class to change the way error details are expressed.

Applies to

See also