Error Codes
Complete reference of error codes returned by the LogTalk API. All errors include a documentation URL for additional help.
Error Response Format
All API errors follow a consistent format:
{"success": false,"error": {"code": "ERROR_CODE","message": "Human-readable error message","details": {"field": "additional context"},"documentation_url": "https://docs.logtalk.io/errors/ERROR_CODE"},"request_id": "req_1kn5f2a_a3b4c5d6e7f8","timestamp": "2026-01-18T12:00:00.000Z"}
| Field | Description |
|---|---|
success | Always false for errors |
error.code | Machine-readable error code for programmatic handling |
error.message | Human-readable description of the error |
error.details | Additional context (optional, varies by error) |
error.documentation_url | Link to documentation for this error |
request_id | Unique identifier for debugging and support |
HTTP Status Codes
| Status | Description |
|---|---|
200 | Success |
202 | Accepted (async processing started) |
400 | Bad Request - Invalid parameters or request body |
401 | Unauthorized - Missing or invalid API key |
402 | Payment Required - Quota exceeded |
403 | Forbidden - Insufficient permissions or tier |
404 | Not Found - Resource does not exist |
408 | Request Timeout - Processing took too long |
409 | Conflict - Idempotency key conflict |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
503 | Service Unavailable - Temporary maintenance |
Authentication Errors (401)
| Error Code | Description | Resolution |
|---|---|---|
MISSING_API_KEY | No Authorization header provided | Add the Authorization header with your API key |
INVALID_API_KEY | API key format invalid or not found | Check the key format and verify it exists |
EXPIRED_API_KEY | API key has expired | Create a new API key in your dashboard |
Authorization Errors (403)
| Error Code | Description | Resolution |
|---|---|---|
API_ACCESS_DENIED | API access requires Growth tier or higher | Upgrade your subscription to access the API |
INSUFFICIENT_PERMISSIONS | API key lacks required permissions | Create a key with appropriate permissions |
RESOURCE_ACCESS_DENIED | You do not have access to this resource | Verify the resource belongs to your organization |
Validation Errors (400)
| Error Code | Description | Resolution |
|---|---|---|
VALIDATION_ERROR | Request validation failed | Check the error details for specific field issues |
INVALID_REQUEST | Invalid JSON in request body | Verify your JSON is well-formed |
MISSING_REQUIRED_FIELD | A required field is missing | Include all required fields in your request |
INVALID_FIELD_VALUE | Field value is invalid | Check the allowed values for the field |
CONTENT_TOO_LARGE | Content exceeds maximum size (50KB) | Reduce the content size |
INVALID_RETRY_STATE | Conversion cannot be retried in its current state | Only failed episodes can be retried |
Quota Errors (402)
| Error Code | Description | Resolution |
|---|---|---|
AUDIO_QUOTA_EXCEEDED | Monthly audio episode quota exceeded | Purchase credits or upgrade your plan |
VIDEO_QUOTA_EXCEEDED | Monthly video episode quota exceeded | Purchase credits or upgrade your plan |
QUOTA_EXCEEDED | General quota exceeded | Check your usage and upgrade if needed |
Rate Limit Errors (429)
| Error Code | Description | Resolution |
|---|---|---|
DAILY_LIMIT_EXCEEDED | Daily API request limit exceeded | Wait until the daily limit resets (midnight UTC) |
MINUTE_LIMIT_EXCEEDED | Per-minute request limit exceeded | Wait and retry after the Retry-After interval |
CONCURRENT_LIMIT_EXCEEDED | Too many concurrent processing jobs | Wait for existing jobs to complete |
Rate limit responses include a Retry-After header indicating how many seconds to wait before retrying.
Resource Errors (404)
| Error Code | Description | Resolution |
|---|---|---|
CONVERSION_NOT_FOUND | Conversion does not exist | Verify the episode ID |
SCRIPT_NOT_FOUND | Script does not exist or has expired | Generate a new script (scripts expire after 2 hours) |
ORGANIZATION_NOT_FOUND | Organization does not exist | Verify the organization ID |
RESOURCE_NOT_FOUND | Generic resource not found | Check the resource identifier |
Conflict Errors (409)
| Error Code | Description | Resolution |
|---|---|---|
IDEMPOTENCY_CONFLICT | Idempotency key used with different request | Use a unique idempotency key for different requests |
Server Errors (500, 503)
| Error Code | Description | Resolution |
|---|---|---|
INTERNAL_ERROR | An unexpected error occurred | Retry the request; contact support if it persists |
GENERATION_FAILED | Script or audio generation failed | Check content validity; retry the request |
SERVICE_UNAVAILABLE | Service is temporarily unavailable | Wait and retry; check status page |
Handling Errors
Best practices for handling API errors:
Error Handling Example
async function createConversion(content) {const response = await fetch('https://api.logtalk.io/v1/episodes', {method: 'POST',headers: {'Authorization': `Bearer ${process.env.LOGTALK_API_KEY}`,'Content-Type': 'application/json'},body: JSON.stringify({ content, output_format: 'audio' })});const data = await response.json();if (!data.success) {const { error } = data;switch (error.code) {case 'AUDIO_QUOTA_EXCEEDED':console.error('Quota exceeded, need to upgrade or purchase credits');break;case 'DAILY_LIMIT_EXCEEDED':const retryAfter = response.headers.get('Retry-After');console.error(`Rate limited, retry after ${retryAfter} seconds`);break;case 'VALIDATION_ERROR':console.error('Invalid request:', error.details);break;case 'INVALID_RETRY_STATE':console.error('Cannot retry episode in current state');break;default:console.error(`Error ${error.code}: ${error.message}`);console.error(`Documentation: ${error.documentation_url}`);}throw new Error(error.message);}return data.data;}