> 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/1.3.x/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](/1.3.x/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cspr.cloud/1.3.x/documentation/overview/errors.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
