The Qoder Cloud Agents API returns errors in a consistent envelope. Each error response carries structured fields suitable for programmatic handling and debugging.Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
Error envelope
All error responses follow this JSON structure:Field descriptions
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Always "error" |
error.type | string | Yes | Error type identifier |
error.message | string | Yes | Human-readable error description |
error.param | string | No | Name of the request parameter that caused the error |
error.feature | string | No | Feature that needs activation (501 only) |
error.available_from | string | No | Beta identifier exposing the feature (501 only) |
Error types
| HTTP status | error.type | Description |
|---|---|---|
| 400 | invalid_request_error | Invalid or missing request parameters |
| 401 | authentication_error | Authentication failed; token missing or invalid |
| 403 | permission_error | Authenticated but not authorized for the resource |
| 404 | not_found_error | Target resource does not exist |
| 409 | conflict_error | Resource state conflict (for example, duplicate creation) |
| 500 | api_error | Internal server error |
| 501 | feature_not_available | Feature not enabled; activation via Beta header required |
Error type details
400 — invalid_request_error
The request format or parameters are invalid.
Common triggers:
- Missing required field (for example,
name) - Field type mismatch (such as a number where a string is expected)
- Body exceeds the 32 MB limit
- Malformed JSON
401 — authentication_error
Authentication failed.
Common triggers:
- Missing
Authorizationheader - Malformed PAT
- PAT expired or revoked
x-api-keyused instead of a bearer token
403 — permission_error
Authenticated but not authorized.
Common triggers:
- The PAT does not have access to the target Agent (different user or organization)
- The PAT scopes do not cover this operation
- Attempting to operate on an archived and locked resource
404 — not_found_error
The target resource does not exist.
Common triggers:
- Agent, Session, or Environment ID does not exist
- The resource has been deleted
- URL path typo
409 — conflict_error
Resource state conflict prevents the operation.
Common triggers:
- Same idempotency key reused with a different request body
- Operating on a terminated Session
- Creating a duplicate uniquely-named resource
500 — api_error
Internal server error.
Common triggers:
- Service temporarily unavailable
- Internal component failure
- Database connection timeout
For 500 errors, retry with exponential backoff (for example, 1s → 2s → 4s).
501 — feature_not_available
The requested feature is not yet enabled and requires a Beta header.
Common triggers:
- Required Beta feature identifier missing
- Outdated Beta identifier
Error handling best practices
- Branch on
error.typerather than the HTTP status code. - Log
error.messagefor diagnostics. - Inspect
error.paramto locate the offending field. - Do not retry 4xx errors unless the request was modified.
- Retry 5xx errors with exponential backoff (up to 3 attempts).