> For the complete documentation index, see [llms.txt](https://docs.cspr.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cspr.cloud/documentation/overview/errors.md).

# 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:

| Property  | Type     | Description                                                      |
| --------- | -------- | ---------------------------------------------------------------- |
| `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

| Code               | Name                 | HTTP Status Code | Description                              |
| ------------------ | -------------------- | ---------------- | ---------------------------------------- |
| `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

```bash
curl -X 'GET' \
  'https://api.testnet.cspr.cloud/accounts/invalid_identifier' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "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](/documentation/overview/rate-limits-and-quotas.md) for more information regarding Rate limiting errors.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cspr.cloud/documentation/overview/errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
