Class JsonRpcError
- Namespace
- Geotab.Checkmate.ObjectModel.Web
- Assembly
- Geotab.Checkmate.ObjectModel.dll
Models a JSON-RPC error provided as "error" property of JSON-RPC response object when an error is encountered while making a request. http://www.jsonrpc.org/specification#error_object.
public class JsonRpcError
- Inheritance
-
JsonRpcError
- Inherited Members
Constructors
JsonRpcError()
public JsonRpcError()
Properties
Code
Gets or sets exception code indicating the error type that occurred.
public int? Code { get; set; }
Property Value
Data
Gets or sets the JsonRpcErrorData containing detailed information about the error.
public JsonRpcErrorData? Data { get; set; }
Property Value
Errors
Gets or sets inner errors.
[Obsolete("Errors is no longer supported", false)]
public JsonRpcError.JsonErrorInner[]? Errors { get; set; }
Property Value
Remarks
Obsolete: exists for backwards compatibility.
Message
Gets or sets a short description of the error, ex: "Argument Out Of Range" with no error context-specific data.
public string? Message { get; set; }
Property Value
Name
Gets the name of the JSON-RPC error.
[Obsolete("Name is no longer supported, use 'Data.Type'", false)]
public string Name { get; }
Property Value
Remarks
Obsolete: exists for backwards compatibility.
Methods
FromException(Exception, bool)
Gets a JSON-RPC error from an exception.
public static JsonRpcError FromException(Exception exception, bool returnException = false)
Parameters
exception
ExceptionThe Exception to include in the error.
returnException
boolAlways return the exception
Returns
- JsonRpcError
A populated JSON-RPC error.