API tutorials

Errors & troubleshooting

Diagnose routing, authentication, claim, pagination, and response failures using HTTP status and request IDs.

Check HTTP status and the JSON success field. The body code is a request correlation ID; X-AIDX-Error-Type is the machine-readable error classification when supplied.

Common problems

SymptomWhat to check
400 Bad RequestSupply X-Workspace-Id, a positive evaluation ID, and the original trace UUID. Claim JSON needs exactly two keys and a numeric evaluationId. Check pageSize (1–100), pageToken, and non-empty form fields.
401 UnauthorizedCheck the Bearer PAT, expiration/revocation, and tenant routing. An Organization account PAT needs its X-Tenant-Id; a Personal account request must not retain another organization's header. Tokens are account-specific even for the same email. Revoked organization membership can also invalidate PAT authentication.
403 ForbiddenCheck account/tenant/workspace status, workspace membership, and module permission. A PAT does not bypass authorization.
404 Not FoundCheck origin, tenant, workspace, evaluation ID, and trace pairing. The manifest/claim evaluation must belong to the PAT's user; an out-of-scope evaluation can appear missing.
409 ConflictThe evaluation may be initializing, bound to Managed Trigger/Runner, owned by a Query/retry, or unable to accept another claim. Inspect its state before retrying.
410 GoneThe promptsAll and all-adv-prompts handlers are retired. Migrate to trace-manifests and trace-claims. Authentication can reject an old route before it reaches the 410 handler.
415 Unsupported Media TypeUse application/json for trace-claims. Use form parameters for response and adv-response.
429 Too Many RequestsReduce request rate and wait for Retry-After when supplied. Keep the same evaluation, trace, and routing context.
503 Service UnavailableThe claim boundary, frozen prompt, tenant, or a dependent service may be unavailable. Record the request ID; inspect state before retrying a write.
No prompt in manifestExpected. Claim a trace and read data.prompt; the manifest only lists metadata.
alreadyClaimed is trueThe prompt was claimed previously. Recover the saved target result or inspect execution state; do not assume another model call is required.
Submission succeeds but progress stallsConfirm the evaluation type, response field, and trace pairing in Process Details. A repeated POST does not overwrite an existing answer, and acknowledgement does not prove scoring completed.

Diagnose in a fixed order

  1. Check transport and routing

    Compare the API origin, tenant ID, and workspace ID with Request Tutorial. Record HTTP status and response headers.

  2. Check credentials and ownership

    Use a current AIDX PAT for the evaluation's creator. Verify membership and module access.

  3. Check identifiers and request format

    Use a numeric evaluation ID and an unchanged manifest trace UUID. Claim JSON contains only evaluationId and traceId; response submissions use form fields.

  4. Check pagination and execution state

    Follow nextLink without rebuilding it. Confirm that another execution mechanism does not own the evaluation or trace.

  5. Check receipt and assessment

    Inspect Process Details and saved target output before replaying a request whose outcome is uncertain.

Record diagnostic identifiers

Save the body code or response X-Request-Id, plus X-AIDX-Error-Type when present. The correlation ID changes for each request and is not a fixed success/error code. Preserve the HTTP status even if a proxy returns non-JSON content.