Errors
The error bodies the engine API returns, the codes you can branch on, and what to do about each.
On this page
Every error response is JSON with an HTTP status and an error message. Most also carry a code you can branch on. Read the status first, then the code, and treat the message as text for people.
{
"error": "Workflow not found",
"code": "NOT_FOUND"
}| Field | Present | What it is |
|---|---|---|
error | always | A message for a person. It can change between releases. |
code | most errors | A stable code. See the tables below. |
details | some 400 responses | Context, such as the list of fields that failed validation. |
Most API responses carry an X-Request-ID header. Send one in x-request-id and the engine uses it, or it makes one. Quote it when you ask for help.
Standard codes
| Status | Code | Meaning | What to do |
|---|---|---|---|
| 400 | BAD_REQUEST | The body or a parameter is invalid. details may list issues. | Fix the request. |
| 401 | UNAUTHORIZED | The credential is missing, wrong or expired. | Get a new token. See below. |
| 403 | FORBIDDEN | Your role, license or address does not allow this. | Use a role with access. |
| 404 | NOT_FOUND | No such thing in your workspace. | Check the id and the workspace. |
| 409 | CONFLICT | The request clashes with the current state. | Read the state, then change the request. |
| 429 | RATE_LIMITED | Too many requests. Most rate limits return only error. | Wait for Retry-After. |
| 500 | INTERNAL_ERROR | The engine failed. | Retry, then check the engine logs. |
| 501 | NOT_CONFIGURED | This deployment does not support the call, such as VPN tunnel management outside GKE. | Configure it, or skip it. |
Before a route runs
The engine checks these before it reaches the route. Most return only error.
| Status | Body | Cause |
|---|---|---|
| 401 | {"error": "Authentication required"} | No bearer token or session. |
| 401 | {"error": "Invalid or expired token"} | The token is bad or older than 2 hours, or its API client was revoked. |
| 401 | {"error": "Session expired"} | A browser session ended. Sign in again. |
| 403 | {"error": "Forbidden", "detail": "Your role does not allow this action"} | The role is too low for this route and method. See Roles. |
| 403 | {"error": "This API client is read-only (viewer)"} | A viewer client used a method other than GET or HEAD. |
| 403 | {"error": "Forbidden", "code": "WORKSPACE_FORBIDDEN", "detail": "You are not a member of this workspace"} | A person who is not a member of the workspace named by X-Workspace-Id. See Workspaces. |
| 403 | {"error": "Forbidden", "detail": "Your IP address is not in the allowlist", "ip": "..."} | The IP allowlist is on and your address is not on it. |
| 403 | {"error": "Cross-site request blocked"} | A browser session sent a cross-site request. |
| 503 | {"error": "IP allowlist unavailable"} | The engine cannot read the allowlist and IP_ALLOWLIST_FAIL_OPEN=false. |
POST /api/auth/token answers 400 when the body has neither apiKey nor secret, and 401 UNAUTHORIZED for a bad, revoked or expired key. It allows 5 tries a minute per IP address.
Rate limits
A rate limited call returns 429 with these headers:
| Header | Meaning |
|---|---|
Retry-After | Seconds to wait before you try again. |
X-RateLimit-Limit | Requests allowed in the window. |
X-RateLimit-Remaining | Always 0 on a 429. |
X-RateLimit-Reset | When the window ends, in Unix seconds. |
The body is {"error": "Too many requests. Please try again later."}. Each operation in the API reference lists its own limit. Inbound triggers have their own limits: see TRIGGER_RATE_LIMIT_PER_MINUTE and MLLP_INGEST_RATE_LIMIT in Environment variables.
Inbound trigger codes
These come from the routes that receive messages. See Triggers.
| Status | Code | Route | Meaning |
|---|---|---|---|
| 401 | SIGNATURE_REQUIRED | webhook, path receiver | The trigger needs a signature or credential, and the request has none. Send an API client's bearer token, or set an HMAC secret and sign. |
| 403 | INVALID_SIGNATURE | webhook | The x-hub-signature-256 value is wrong. |
| 403 | INVALID_CREDENTIALS | path receiver | The webhook profile's credential is wrong. |
| 401 | INVALID_TOKEN | FHIR subscription | The subscription token is missing or wrong. |
| 413 | PAYLOAD_TOO_LARGE | webhook, path receiver | The body is over WEBHOOK_MAX_BODY_BYTES or has too many NDJSON resources. |
| 400 | INVALID_NDJSON | webhook | A line is not JSON. line gives its number. |
| 413 | BATCH_TOO_LARGE | webhook with splitBatches | The HL7 batch holds more than 500 messages. Nothing ran. Send smaller batches. |
| 403 | PHI_NOT_AUTHORIZED | webhook, path receiver | The workflow handles PHI and the license does not allow it yet. remediation says how to fix that. |
| 409 | NOT_RUN | webhook, path receiver | A trigger matched, but its workflow is not deployed or enabled. Nothing ran. |
| 503 | NOT_ACCEPTED | webhook, path receiver, X12, FHIR subscription | Nothing was recorded: the engine is shutting down, a write failed, or the backlog reached WORKFLOW_MAX_PENDING. Resend after Retry-After. |
| 503 | IN_PROGRESS | webhook, X12, FHIR subscription | A repeat arrived while the first is still being recorded. Retry after Retry-After. |
| 422 | IDEMPOTENCY_KEY_REUSED | webhook, response.mode: destination | The Idempotency-Key was used for a different body. Nothing ran. |
| 502 | RESPONSE_TOO_LARGE | webhook, response.mode: destination | The step's output is over WEBHOOK_MAX_BODY_BYTES. The run itself completed. |
| 422 | none, status: "rejected" | X12 | The 999 or TA1 rejected every transaction set a trigger takes. Nothing was recorded. errors says why. |
The MLLP route answers with an ACK decision, not an error. See MLLP and ACKs.
Replay codes
A refused replay returns one of the codes in Refusals: NOT_FOUND, WORKFLOW_DISABLED, IN_PROGRESS, RETRY_SCHEDULED, ALREADY_DELIVERED, NO_FAILED_DESTINATION, CHAIN_TOO_DEEP, CONFLICTING_SCOPE, INVALID_REQUEST, UNKNOWN_DESTINATION, NO_DESTINATIONS, NOT_A_MESSAGE and STALE_SCOPE.
Other codes
| Status | Code | Where | Meaning |
|---|---|---|---|
| 403 | AI_FEATURES_DISABLED | AI routes | AI is off. In production it stays off until AI_FEATURES_ENABLED=true. |
| 429 | none | AI routes | The daily AI budget is used up. It resets at midnight UTC. |
| 503 | none | AI routes | ANTHROPIC_API_KEY is not set. |
| 400 | DESTINATION_PROFILE_MISSING | save, deploy, rollback (in details.code) | An enabled workflow has a destination with no adapter profile. |
| 400 | INVALID_CRON | save (in details.issues), deploy (409) | A cron or schedule expression that never runs, or an unknown time zone. |
| 400 | EDGE_CONDITION_UNSUPPORTED, WAIT_UNSUPPORTED | save (400), deploy (409, in issues) | An edge with a condition, or a wait step. Neither runs. Use a condition step. |
| 409 | INVALID_NAME_PATTERN | deploy (in issues) | A destination file or object name template is not valid. |
| 409 | none, with missing | deploy | The version is not ready: missing lists test, test-cases or approval. |
| 503 | SHUTTING_DOWN | POST /api/workflows/{id}/execute | The replica is stopping. Retry, and another replica runs it. |
| 503 | HISTORY_UNAVAILABLE | POST /api/workflows/{id}/execute | The engine could not write the run's history, so it did not start. |
| 403 | PHI_SEARCH_FORBIDDEN, PHI_FORBIDDEN | messages, field values | A viewer searched message content or asked for field values. |
| 400 | TOO_MANY | POST /api/messages/reprocess | More messages match than BULK_REPROCESS_MAX allows. Narrow the search. |
| 409 | COUNT_CHANGED | POST /api/messages/reprocess | The number of matches changed since you confirmed it. count is the new number. |
| 409 | BUSY | POST /api/messages/reprocess | A bulk reprocess is already running in this workspace. |
| 503 | AUDIT_UNAVAILABLE | POST /api/messages/reprocess | The audit log could not be written, so nothing was reprocessed. |
| 404 | none | /api/graphql | GraphQL is off. Set GRAPHQL_ENABLED=true. |
| 403 | none | replay | The license is not valid. The body is {"error": "...", "details": "..."}. |
Troubleshooting
- A 401 on a call that worked an hour ago. Tokens last 2 hours. Request a new one with
POST /api/auth/token. - A 403 with
Your role does not allow this action. Use a client or person with a higher role. - A 404 on an id you just created. The call may be in another workspace. Send
X-Workspace-Id. - A 403
WORKSPACE_FORBIDDEN. You are not a member of that workspace. An admin adds you under Settings → Users & roles → Members. - A 429 in a loop. Back off for
Retry-Afterseconds, then slow down. Do not retry in a tight loop.