# Error Reference

### HTTP Status Codes

| Status Code | Description                                                |
| ----------- | ---------------------------------------------------------- |
| 200         | Success — request completed successfully                   |
| 400         | Bad Request — invalid parameters or business logic error   |
| 401         | Unauthorized — missing or invalid API key                  |
| 403         | Forbidden — IP not whitelisted or insufficient permissions |
| 429         | Too Many Requests — rate limit or idempotency violation    |
| 500         | Internal Server Error                                      |

### Common Error Messages

| Message                                                     | Cause                                             |
| ----------------------------------------------------------- | ------------------------------------------------- |
| `No token provided`                                         | Missing `Authorization` header                    |
| `Invalid token prefix`                                      | API key has an unrecognized prefix                |
| `Invalid api key`                                           | API key does not match any merchant record        |
| `Merchant not found`                                        | No merchant associated with the API key           |
| `Business not found`                                        | No business associated with the merchant          |
| `User not found`                                            | No user associated with the merchant              |
| `No Test SSH Key found` / `No Live SSH Key found`           | SSH public key not configured for the environment |
| `IP address not whitelisted`                                | Client IP is not in the allowed IP list           |
| `Permission denied`                                         | Business role lacks the required permission       |
| `No account role assigned`                                  | Business has no role configured                   |
| `Service is currently unavailable. Please try again later.` | Service disabled via emergency shutdown           |
| `Merchant configuration not found`                          | Merchant config record missing                    |
| `Too many request`                                          | Rate limit exceeded (60 requests/minute)          |


---

# Agent Instructions: 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.cngn.co/integrations/error-reference.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.
