JSON-RPC Error Object

When a call to the API encounters an error, the response object will include an error member. This error member holds an object that provides detailed information about the error. The format of the object is shown below:

Copy
{
  "code": error-code,
  "message": "error-message",
  "detail": "error-message-detail"
}
error-code

A Number that indicates the error type that occurred. This is an integer.

error-message

A String providing a short description of the error.

error-message-detail

A Primitive or Structured value that contains additional information about the error.

example
Copy
{
  "code": 401,
  "message": "Unauthorized",
  "detail": "Invalid token or missing authentication header."
}