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

# Error handling

All errors return a consistent JSON envelope. Handle errors by checking the HTTP status code first, then the `error.code` field for programmatic handling.

```json theme={null}
{
  "error": {
    "code": "LANGUAGE_NOT_SUPPORTED",
    "message": "The requested language is not available.",
    "request_id": "req_a1b2c3d4"
  }
}
```

| HTTP STATUS | ERROR CODE                                                          | DESCRIPTION                                              |
| :---------- | :------------------------------------------------------------------ | :------------------------------------------------------- |
| 400         | <span style={{ color: '#f87171' }}>INVALID\_REQUEST</span>          | Malformed request body or missing required field.        |
| 401         | <span style={{ color: '#f87171' }}>UNAUTHORIZED</span>              | Missing or invalid API key.                              |
| 404         | <span style={{ color: '#f87171' }}>LANGUAGE\_NOT\_SUPPORTED</span>  | Requested language is not available on this endpoint.    |
| 404         | <span style={{ color: '#f87171' }}>VOICE\_NOT\_FOUND</span>         | Requested voice ID does not exist for this language.     |
| 404         | <span style={{ color: '#f87171' }}>JOB\_NOT\_FOUND</span>           | The specified `job_id` does not exist.                   |
| 422         | <span style={{ color: '#f87171' }}>AUDIO\_PROCESSING\_FAILED</span> | Source audio could not be parsed or transcribed.         |
| 429         | <span style={{ color: '#f87171' }}>RATE\_LIMIT\_EXCEEDED</span>     | Request rate exceeds plan limits. See `Retry-After`.     |
| 500         | <span style={{ color: '#f87171' }}>INTERNAL\_ERROR</span>           | Unexpected server error. Retry with exponential backoff. |

<Info>
  All responses include a request\_id. Include this in any support ticket to help us trace issues quickly.
</Info>
