> ## Documentation Index
> Fetch the complete documentation index at: https://developer.zamp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Understand how to handle error responses from the Zamp API.

# Overview

Successful requests return a `2xx` status code. When an error occurs, inspect the error code and message for debugging.

## Status Code Categories

| Range   | Meaning                                                  |
| ------- | -------------------------------------------------------- |
| **2xx** | Successful response                                      |
| **4xx** | Client error — typically validation or rate limit issues |
| **5xx** | Server error — processing failure                        |

## Common Errors

| Error Code              | Status | Description                                                          |
| ----------------------- | ------ | -------------------------------------------------------------------- |
| `PARSE_ERROR`           | 400    | Content-Type not set to `application/json` or malformed JSON payload |
| `BAD_REQUEST`           | 400    | Invalid request that cannot be processed                             |
| `UNAUTHORIZED`          | 401    | Failed authentication of bearer token in Authorization header        |
| `FORBIDDEN`             | 403    | Valid request but lacking permission for the resource                |
| `NOT_FOUND`             | 404    | Specified resource does not exist                                    |
| `TIMEOUT`               | 408    | Server unable to generate response within time constraints           |
| `CONFLICT`              | 409    | Specified resource already exists                                    |
| `UNPROCESSABLE_CONTENT` | 422    | Well-formed request that violates one or more business rules         |
| `TOO_MANY_REQUESTS`     | 429    | Request rate exceeded quota                                          |
| `INTERNAL_SERVER_ERROR` | 500    | Server error during request processing                               |

## Example Responses

**Rate limit error (429):**

```json theme={null}
{
  "code": "TOO_MANY_REQUESTS",
  "message": "Rate limit exceeded"
}
```

**Validation error (400):**

```json theme={null}
{
  "code": "BAD_REQUEST",
  "message": "Input validation failed",
  "issues": [
    {
      "code": "invalid_type",
      "message": "Required",
      "path": ["payload"],
      "expected": "string",
      "received": "undefined"
    }
  ]
}
```

## Other Errors

| Error Code              | Status |
| ----------------------- | ------ |
| `METHOD_NOT_SUPPORTED`  | 405    |
| `PRECONDITION_FAILED`   | 412    |
| `PAYLOAD_TOO_LARGE`     | 413    |
| `CLIENT_CLOSED_REQUEST` | 499    |
