# Errors

## Variations

We follow standard HTTP status codes for errors. Here are the variations you might encounter:

### `request_invalid`

- **Status Code:** 400
- **Message:** "The request is invalid."
- **How to Resolve:** Check the request payload for missing or incorrect fields.

### `request_no_update`

- **Status Code:** 400
- **Message:** "There was nothing new to update."
- **How to Resolve:** Make sure you're submitting new or modified data.

### `request_validation_failed`

- **Status Code:** 400
- **Message:** "The request failed validation."
- **How to Resolve:** Ensure all fields meet the required validation rules.

### `unsupported_file_type`

- **Status Code:** 400
- **Message:** "Unsupported file type."
- **How to Resolve:** Use one of the supported file formats.

### `auth_missing_credentials`

- **Status Code:** 401
- **Message:** "You must provide credentials to access this resource."
- **How to Resolve:** Include your API key in the `Authorization` header.

### `auth_invalid_credentials`

- **Status Code:** 401
- **Message:** "Your credentials are invalid."
- **How to Resolve:** Double-check your API key or token.

### `auth_account_disabled`

- **Status Code:** 401
- **Message:** "Your account is disabled, please contact support."
- **How to Resolve:** Reach out to support to restore access.

### `auth_missing_permissions`

- **Status Code:** 401
- **Message:** "You do not have permission to access this resource."
- **How to Resolve:** Ensure your account has the appropriate permissions.

### `auth_mfa_required`

- **Status Code:** 401
- **Message:** "Multi-factor authentication is required."
- **How to Resolve:** Complete MFA verification before accessing this resource.

### `resource_limit_reached`

- **Status Code:** 403
- **Message:** "You have reached the limit for this resource."
- **How to Resolve:** Upgrade your plan or wait until the limit resets.

### `forbidden`

- **Status Code:** 403
- **Message:** "This action is forbidden."
- **How to Resolve:** Ensure you have proper permissions for this action.

### `resource_not_found`

- **Status Code:** 404
- **Message:** "The requested resource was not found."
- **How to Resolve:** Verify the resource ID or endpoint.

### `request_timeout`

- **Status Code:** 408
- **Message:** "The request timed out."
- **How to Resolve:** Retry the request or check your connection.

### `rate_limit_exceeded`

- **Status Code:** 429
- **Message:** "You have exceeded the rate limit."
- **How to Resolve:** Reduce the frequency of your requests and try again later.

### `resource_locked`

- **Status Code:** 409
- **Message:** "The resource is locked."
- **How to Resolve:** Unlock the resource if possible or wait until it becomes available.

### `payload_too_large`

- **Status Code:** 413
- **Message:** "The payload was too large for the server to safely handle."
- **How to Resolve:** Reduce the size of the request payload.

### `ingest_spool_full`

- **Status Code:** 503
- **Message:** "Server at capacity (REASON); retry shortly", where REASON names the limiting resource, e.g. a disk-capacity reason such as "N MiB free below the M MiB byte floor" or "inodes P% at/above the C% ceiling", "ingest queue full", or "storage write failed".
- **Returned by:** the ingest endpoint when the server's durable spool cannot accept more records. The response includes a `Retry-After` header (in seconds).
- **How to Resolve:** Retry the request after the `Retry-After` interval. If the error persists, you've outgrown the server's allocated capacity for this project. Provision a larger spool volume or distribute traffic across additional servers.

### `ingest_auth_unavailable`

- **Status Code:** 503
- **Message:** "The ingest key could not be verified; retry shortly."
- **Returned by:** the ingest endpoint when it cannot reach the service that verifies ingest keys. Your key has not been rejected, and nothing about the request needs to change. The response includes a `Retry-After` header (in seconds).
- **How to Resolve:** Retry the request after the `Retry-After` interval. Tailglow SDKs do this automatically. A key that was verified recently keeps being accepted throughout the outage, so this only affects a key the server has not seen lately.

### `database_error`

- **Status Code:** 500
- **Message:** "A database error occurred."
- **How to Resolve:** Try again later or contact support if the issue persists.

### `invalid_server_state`

- **Status Code:** 500
- **Message:** "The server is in an invalid state."
- **How to Resolve:** Contact support if the issue persists.

### `plan_limit_reached`

- **Status Code:** 403
- **Message:** "You have reached the limit for your current plan."
- **How to Resolve:** Upgrade your plan to increase your limits.

### `server_error`

- **Status Code:** 500
- **Message:** "An error occurred."
- **How to Resolve:** Try again later or contact support if the issue persists.

### `not_implemented`

- **Status Code:** 501
- **Message:** "This route has not been implemented."
- **How to Resolve:** Contact support or refer to the documentation for available routes.
