Skip to content
Reference

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.

json
{
  "error": "Workflow not found",
  "code": "NOT_FOUND"
}
FieldPresentWhat it is
erroralwaysA message for a person. It can change between releases.
codemost errorsA stable code. See the tables below.
detailssome 400 responsesContext, 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

StatusCodeMeaningWhat to do
400BAD_REQUESTThe body or a parameter is invalid. details may list issues.Fix the request.
401UNAUTHORIZEDThe credential is missing, wrong or expired.Get a new token. See below.
403FORBIDDENYour role, license or address does not allow this.Use a role with access.
404NOT_FOUNDNo such thing in your workspace.Check the id and the workspace.
409CONFLICTThe request clashes with the current state.Read the state, then change the request.
429RATE_LIMITEDToo many requests. Most rate limits return only error.Wait for Retry-After.
500INTERNAL_ERRORThe engine failed.Retry, then check the engine logs.
501NOT_CONFIGUREDThis 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.

StatusBodyCause
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:

HeaderMeaning
Retry-AfterSeconds to wait before you try again.
X-RateLimit-LimitRequests allowed in the window.
X-RateLimit-RemainingAlways 0 on a 429.
X-RateLimit-ResetWhen 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.

StatusCodeRouteMeaning
401SIGNATURE_REQUIREDwebhook, path receiverThe 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.
403INVALID_SIGNATUREwebhookThe x-hub-signature-256 value is wrong.
403INVALID_CREDENTIALSpath receiverThe webhook profile's credential is wrong.
401INVALID_TOKENFHIR subscriptionThe subscription token is missing or wrong.
413PAYLOAD_TOO_LARGEwebhook, path receiverThe body is over WEBHOOK_MAX_BODY_BYTES or has too many NDJSON resources.
400INVALID_NDJSONwebhookA line is not JSON. line gives its number.
413BATCH_TOO_LARGEwebhook with splitBatchesThe HL7 batch holds more than 500 messages. Nothing ran. Send smaller batches.
403PHI_NOT_AUTHORIZEDwebhook, path receiverThe workflow handles PHI and the license does not allow it yet. remediation says how to fix that.
409NOT_RUNwebhook, path receiverA trigger matched, but its workflow is not deployed or enabled. Nothing ran.
503NOT_ACCEPTEDwebhook, path receiver, X12, FHIR subscriptionNothing was recorded: the engine is shutting down, a write failed, or the backlog reached WORKFLOW_MAX_PENDING. Resend after Retry-After.
503IN_PROGRESSwebhook, X12, FHIR subscriptionA repeat arrived while the first is still being recorded. Retry after Retry-After.
422IDEMPOTENCY_KEY_REUSEDwebhook, response.mode: destinationThe Idempotency-Key was used for a different body. Nothing ran.
502RESPONSE_TOO_LARGEwebhook, response.mode: destinationThe step's output is over WEBHOOK_MAX_BODY_BYTES. The run itself completed.
422none, status: "rejected"X12The 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

StatusCodeWhereMeaning
403AI_FEATURES_DISABLEDAI routesAI is off. In production it stays off until AI_FEATURES_ENABLED=true.
429noneAI routesThe daily AI budget is used up. It resets at midnight UTC.
503noneAI routesANTHROPIC_API_KEY is not set.
400DESTINATION_PROFILE_MISSINGsave, deploy, rollback (in details.code)An enabled workflow has a destination with no adapter profile.
400INVALID_CRONsave (in details.issues), deploy (409)A cron or schedule expression that never runs, or an unknown time zone.
400EDGE_CONDITION_UNSUPPORTED, WAIT_UNSUPPORTEDsave (400), deploy (409, in issues)An edge with a condition, or a wait step. Neither runs. Use a condition step.
409INVALID_NAME_PATTERNdeploy (in issues)A destination file or object name template is not valid.
409none, with missingdeployThe version is not ready: missing lists test, test-cases or approval.
503SHUTTING_DOWNPOST /api/workflows/{id}/executeThe replica is stopping. Retry, and another replica runs it.
503HISTORY_UNAVAILABLEPOST /api/workflows/{id}/executeThe engine could not write the run's history, so it did not start.
403PHI_SEARCH_FORBIDDEN, PHI_FORBIDDENmessages, field valuesA viewer searched message content or asked for field values.
400TOO_MANYPOST /api/messages/reprocessMore messages match than BULK_REPROCESS_MAX allows. Narrow the search.
409COUNT_CHANGEDPOST /api/messages/reprocessThe number of matches changed since you confirmed it. count is the new number.
409BUSYPOST /api/messages/reprocessA bulk reprocess is already running in this workspace.
503AUDIT_UNAVAILABLEPOST /api/messages/reprocessThe audit log could not be written, so nothing was reprocessed.
404none/api/graphqlGraphQL is off. Set GRAPHQL_ENABLED=true.
403nonereplayThe 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-After seconds, then slow down. Do not retry in a tight loop.

Reference