Skip to main content

Errors

Non-success responses use one envelope:

{ "error": { "code": "NOT_FOUND", "message": "Trigger not found", "details": {} } }

details is present only when the error carries structured details.

StatusCodeMeaning
400VALIDATIONMalformed JSON, a schema violation, an unknown field on a strict request body, or a prompt/input mismatch.
400CALLER_CREDENTIALS_UNEXPECTEDCaller material was supplied for an integration that the target does not run at caller identity.
403FORBIDDENThe authenticated caller lacks the required permission or session visibility for a known resource.
403SESSION_NOT_DRIVABLEThe session is visible, but this caller cannot send messages, upload files or control its turns. Evaluation replays also cannot be driven.
404NOT_FOUNDUnknown or cross-organization id, invalid/revoked key, or a missing-or-unauthorized entry resource. Trigger ingress deliberately combines missing and unauthorized responses.
409CONFLICTThe request conflicts with current state, such as a stale approval or a decision that was already made. Authorized agent follow-ups can queue during an active turn.
409IDEMPOTENCY_KEY_REUSEDA fire idempotency key was reused with a different request.
409IDEMPOTENCY_IN_PROGRESSThe first request using this fire idempotency key is still running.
409IDEMPOTENCY_OUTCOME_UNKNOWNThe original fire may have taken effect, but its outcome cannot be replayed safely.
429RATE_LIMITEDThe route's current request window was exceeded.
429AUTOMATION_AT_CAPACITYThe agent or flow's published concurrency limit has been reached.
429ORG_RUN_RATE_LIMITEDThe organization started more runs in one minute than its plan allows; Retry-After names the wait.
500INTERNALUnexpected server failure.

For a visible evaluation replay, sending a new message returns 400 VALIDATION with the same read-only explanation shown in the session. Session visibility is checked before that explanation is returned.

Execution can also record errors after the HTTP request has already returned 202:

PhaseCodeMeaning
RuntimeCALLER_CREDENTIAL_REQUIREDEffective policy required caller material and none was available.
RuntimeNO_CREDENTIAL_AVAILABLEStored fallback was allowed, but no organization credential was connected.
RuntimeCALLER_CREDENTIAL_EXPIREDSupplied caller material expired before the step ran; it is not replaced by stored authority.
Trigger subscriberCALLER_CREDENTIALS_REQUIREDThis subscriber requires caller material that the fire did not supply; other subscribers continue.
RuntimeCALLER_MODE_NOT_CALLABLEAn unattended nested execution tried to start an agent or flow that requires a caller.
RuntimeLLM_BUDGET_EXHAUSTEDThe organization's or domain's monthly token cap stopped a model turn.
RuntimeLLM_BUDGET_UNAVAILABLEEnforcement is fail-closed and budget consumption could not be checked.
RuntimeMANAGED_CAP_EXCEEDEDManaged spend passed the organization's monthly cost cap.
RuntimeMANAGED_BALANCE_EXHAUSTEDThe prepaid managed balance cannot cover the next model call.
RuntimeAUTOMATION_CALL_TOO_DEEPA nested call exceeded the organization's call-depth limit.
RuntimeAUTOMATION_CALL_TOO_MANY_CHILDRENOne execution started more direct children than the organization allows.
RuntimeAUTOMATION_CALL_TREE_TOO_LARGEA call tree exceeded the organization's descendant limit.
RuntimeAUTOMATION_CALL_CYCLEAn agent or flow tried to call one already on its call stack.

Inspect the session, run read, stream, or trigger Run history for the outcome.

LLM_BUDGET_EXHAUSTED means an administrator must raise or clear the cap that bound, or wait for the next UTC calendar month. LLM_BUDGET_UNAVAILABLE means consumption could not be read while enforcement was fail-closed; retry after the budget service recovers.

Recover from fire idempotency conflicts

IDEMPOTENCY_KEY_REUSED

The same key was sent with a different target or request body. This is a client key-generation bug. Do not retry: generate keys so one key identifies exactly one logical fire request.

IDEMPOTENCY_IN_PROGRESS

The first request is still processing. Read Retry-After and retry the identical request with the same key after that interval. The current response sets Retry-After: 2, so this retry is safe after 2 seconds.

IDEMPOTENCY_OUTCOME_UNKNOWN

Do not blindly retry this response. The original request may or may not have taken effect, and the platform cannot prove which. Retrying without checking defeats the idempotency guarantee and may duplicate the effect.

First check whether the work happened: inspect the trigger's Run history. Only decide what to do next after reconciling that evidence.

Retry a capacity refusal

Guarded execution-creation routes return 429 AUTOMATION_AT_CAPACITY with Retry-After: 5 when the agent or flow has no available slot. No new execution is created by the refused request, so retrying after 5 seconds is safe. This is separate from 429 RATE_LIMITED, which protects request volume rather than execution capacity.

Accepted does not mean succeeded

A 202 means the work was accepted. Agent turns and Flow runs execute asynchronously. Trigger fan-out can accept the firing while recording per-subscriber failures; its response lists only sessions that started. Reconcile against the returned resource instead of treating 202 as a completed outcome.

The normal way to learn an outcome is a webhook; the session stream is how you reconcile when one did not arrive.

The internal @yekarai/sdk throws YekarApiError for non-2xx responses. Its public error fields are code, message, status, and optional details; the package is not published for third-party use yet.