When an ALX Protocol operation fails, the server returns aDocumentation Index
Fetch the complete documentation index at: https://docs.xandrlabs.ai/llms.txt
Use this file to discover all available pages before exploring further.
ProtocolErrorEnvelope. Every error response sets ok to false — a failed request must never return a success envelope. The error.code field is machine-readable and stable across compatible releases, making it safe to branch on in client code. The error.message field is human-readable and intended for developer and operator diagnostics. The optional error.suggestion field may be surfaced to end users or in SDK UX.
Error envelope shape
The top-level
code field is an ergonomic alias. The canonical location is error.code. Always read from error.code in production code.Field reference
| Field | Required | Description |
|---|---|---|
ok | Yes | Always false for error responses. |
correlationId | Recommended | Opaque trace identifier. Include in support requests and logs. |
protocol | Recommended | Responding protocol version and capabilities. |
error.type | Yes | Stable error category. Remains valid even when new codes are added to the category. |
error.code | Yes | Machine-readable, stable error code. Safe to switch on. |
error.message | Yes | Human-readable description for developers and operators. |
error.suggestion | No | Remediation guidance. May be shown to end users. |
Canonical error codes
| Code | Type | Meaning | Client action |
|---|---|---|---|
AUTH_REQUIRED | auth | The caller has no valid user identity. No credentials were presented. | Authenticate the user and retry the request. |
UNAUTHORIZED | auth | The caller presented credentials, but they are invalid or mismatched. | Refresh credentials and retry. |
LOW_CONFIDENCE | approval | The selected artifact did not meet the minimum confidence threshold. | Refine the intent, inspect alternatives, or explicitly set options.force. |
NO_ARTIFACT_SELECTED | approval | No compatible artifact matched the request parameters. | Broaden the input or fetch recommendations. |
CONFLICT | execution | Idempotency or in-flight execution conflict — the same operation may already be running. | Retry with exponential backoff, or wait for the existing execution to complete. |
PAYMENT_REQUIRED | billing | Billing or credit state blocks execution. | Add credits, update the plan, or route to a lower-cost path. |
CONFIG_ERROR | config | A server-side authentication or storage configuration is invalid. | Do not retry blindly. Treat as an operator issue and escalate. |
Retry guidance
AUTH_REQUIRED and UNAUTHORIZED
AUTH_REQUIRED and UNAUTHORIZED
LOW_CONFIDENCE and NO_ARTIFACT_SELECTED
LOW_CONFIDENCE and NO_ARTIFACT_SELECTED
Retry only after changing the request inputs or options. Repeating the same request without modification will produce the same result. For
LOW_CONFIDENCE, consider whether options.force is appropriate for your use case. For NO_ARTIFACT_SELECTED, broaden the query or consult the recommendations endpoint.CONFLICT
CONFLICT
Safe to retry with backoff. The conflict may be transient (a concurrent execution is finishing) or indicate that the idempotency key was already consumed. Wait before retrying and check whether the original operation completed.
PAYMENT_REQUIRED
PAYMENT_REQUIRED
Retry only after the billing state has changed — for example, after adding credits or upgrading the plan. Do not implement automatic retry loops that wait for billing changes; surface the error to the user instead.
CONFIG_ERROR
CONFIG_ERROR
Do not retry aggressively. This code indicates a server-side misconfiguration, not a transient failure. Alert your operations team and investigate the server logs. Automated retries will not resolve the underlying issue.
Handling unknown error codes
Clients must treat unknownerror.code values as non-contract-breaking. When you receive an unrecognized code, default to conservative handling — treat it like CONFLICT or surface a generic error to the user. Do not assume any specific retry behavior for an undocumented code.