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

# ERRORS

> Handle each HTTP status code and error type that the Oumi API returns

The Oumi API returns a JSON body with every client error. The `detail` field explains the problem, and the `type` field names the error so your code can handle it:

```json theme={null}
{
  "detail": "This action requires Editor access to this project. You currently have Viewer.",
  "type": "PermissionDeniedError"
}
```

Read `detail` before you retry. Most client errors fail the same way until you change the request.

## CLIENT ERRORS

| Status | Type | Meaning | What to do |
| - | - | - | - |
| `400` | `ValidationError` | The request is invalid, such as a wrong field value or a dataset in the wrong format. | Fix the request using `detail`. |
| `401` | `AuthenticationError` | The request has no valid credentials. | Send a valid Oumi API key. |
| `402` | `NoActiveSubscriptionError`, `InvoiceFailedError`, `NoPaymentMethodError`, `SubscriptionTierError` | The organization's plan or payment blocks the action. | See [When an organization is blocked](https://docs.oumi.ai/admin/billing.md#when-an-organization-is-blocked). |
| `403` | `PermissionDeniedError` | Your role doesn't allow the action. | Ask a project or organization Admin for the role you need. See [People and roles](https://docs.oumi.ai/admin/people.md). |
| `403` | `QuotaExceededError` | The organization reached a count, concurrency, size, or GPU quota. | See [Quotas](https://docs.oumi.ai/admin/quotas.md#when-you-reach-a-limit). |
| `404` | `ResourceNotFoundError` | The resource doesn't exist, or you can't access it. | Check the ID and the project in the URL. |
| `409` | `ConflictError` | The request conflicts with the current state, such as deleting a tool that implementations still use. | Resolve the conflict that `detail` names, then retry. |
| `412` | `PreconditionFailedError` | The resource changed after you read it. | Read the resource again, and reapply your change. |
| `422` | `RequestValidationError` | The request body or parameters don't match the API schema. | Fix the fields listed in the response. |
| `428` | `PreconditionRequiredError` | The request needs a precondition header. | Send the header that `detail` names. |
| `429` | `RateLimitExceededError` | The organization reached a rate quota, or a deployment is starting. | Wait for the `Retry-After` interval, then retry. See [Cold starts](https://docs.oumi.ai/guides/deployment/call.md#cold-starts). |

## SERVER ERRORS

| Status | Type | Meaning | What to do |
| - | - | - | - |
| `500` | `ServerError` | Oumi failed to handle the request. | Retry later. If it continues, contact Oumi with the request time and any job ID. |
| `502` | `BadGatewayError`, `EndpointFailedError` | A service that Oumi called returned an invalid response. For a tool call, your endpoint failed to answer. | Retry later. For a tool endpoint, see [Build a tool endpoint](https://docs.oumi.ai/guides/agents/tool-endpoint.md#responses). |
| `503` | `ServiceUnavailableError` | A service is temporarily unavailable. | Retry later. |
| `504` | `GatewayTimeoutError`, `EndpointTimeoutError` | A service that Oumi called didn't answer in time. For a tool call, your endpoint timed out. | Retry later, or make the endpoint answer faster. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.