Errors

Requests made to our APIs can result in several different error responses. The following document describes error values.

Properties

The Error has the following properties:

PropertyTypeDescription

code

string

Error code constant represented as a string

message

string

Error message depending on the type of error and an API resource

Error Types

CodeNameHTTP Status CodeDescription

invalid_input

InvalidParamError

400

Invalid client input parameters

unauthorized

UnauthorizedError

401

Client is not authorized

access_denied

AccessDeniedError

403

Entity or resource access is forbidden

not_found

NotFoundError

404

Entity not found

duplicate_entity

DuplicateEntityError

409

Entity already exist

Example

curl -X 'GET' \
  'https://api.testnet.cspr.cloud/accounts/invalid_identifier' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
{
  "error": {
    "code": "invalid_input",
    "message": "AccountHash identifier is not a valid account hash or public key"
  }
}

Rate limiting errors

Visit the Rate limits and quotas for more information regarding Rate limiting errors.

Last updated