# Errors and Rate Limits

Fetch Hive returns JSON errors for invalid or failed public API requests. Most endpoints use a simple error shape.

## Error response format

```json
{
  "error": "Invalid access."
}
```

Some endpoints return a more specific message based on the resource or validation failure.

## Common status codes

### `401 Unauthorized`

Fetch Hive returns `401` when the `Authorization` header is missing, invalid, or uses a revoked API key.

Example:

```json
{
  "error": "Invalid access."
}
```

### `404 Not Found`

Fetch Hive returns `404` when the resource does not exist for your account.

Example workflow run response:

```json
{
  "error": "Prompt workflow run not found"
}
```

Example request lookup response:

```json
{
  "error": "Request not found"
}
```

### `422 Unprocessable Entity`

Fetch Hive returns `422` when the request is authenticated but invalid for that endpoint.

Examples:

```json
{
  "error": "Agent not found."
}
```

```json
{
  "error": "Data set not found."
}
```

```json
{
  "error": "You've reached your credit cap."
}
```

## Rate limits and concurrency

Workflow concurrency depends on your plan.

| Plan       | Concurrency cap |
| ---------- | --------------- |
| Lite       | 1               |
| Starter    | 3               |
| Pro        | 5               |
| Entreprise | Custom          |

If you exceed your concurrency cap, Fetch Hive returns `429 Too Many Requests`.

Example:

```json
{
  "error": "You've reached your concurrency limit. Try again later or use async mode."
}
```

If you see this response on a workflow request, retry later or switch to async invocation so Fetch Hive can queue the run.

## Related

* See [Authentication](https://docs.fetchhive.com/api-reference/authentication) for the required bearer header
* See [Invoke Workflow](https://docs.fetchhive.com/api-reference/invoke-workflow) for async workflow requests
* See [Retrieve Run](https://github.com/Jellyfishboy/fetchhive-api/blob/app-v3/LIVE_DOCS/api-reference/retrieve-run.md) for checking workflow status after invocation
