Error codes

Every failure in the platform carries a stable, upper-case code, an optional reason that narrows it, and a params object with the values that explain it. Code and reason are a contract: integrations branch on them, and they never change meaning within API v2. The human wording around them is not a contract and may be rewritten at any time. This page lists every code with its status, reasons, parameters, cause, fix and whether a retry can help

47 codes14 general codes and 33 specific ones: 29 returned by the API, 4 reported on agent runs, builds, syncs and writebacks
ReasonsWritten CODE.REASON where the fix differs between variants, else null
ParamsNamed values behind each message, typed per reason in the generated SDK
StableCodes, reasons and parameter names are never renamed or removed in v2

In the platform today

Built
  • The platform service returns every error of its own as problem details in the shape below: type, title, status, code, reason written CODE.REASON (or null), detail, params, errors, retryable and requestId
  • The request id is on the X-Request-Id header, and traceparent is too when tracing is on
  • A body that is not valid JSON, or a query parameter of the wrong type, gets the web framework's own 422 with {"detail": [ … ]}, and an unknown path a 404 with {"detail": "Not Found"}
  • The built codes are the general codes in the first table, plus INVALID_ARGUMENT, UNAUTHENTICATED, PERMISSION_DENIED, PAYLOAD_TOO_LARGE, RATE_LIMITED, INTERNAL, SERVICE_UNAVAILABLE, ACTION_VALIDATION_FAILED, CONCURRENCY_CONFLICT, BUILD_BLOCKED (returned as 409 when a pipeline build is blocked), WRITEBACK_FAILED (returned as 422, 502 or 503 when a system called before an action's edits refuses or does not answer), FUNCTION_FAILED, FUNCTION_TIMEOUT, NO_ELIGIBLE_ROUTE and MODEL_BUDGET_EXCEEDED, each with the built reasons its section names
  • Specific failures are reasons under them: a missing object is NOT_FOUND.OBJECT_NOT_FOUND, a missing or hidden object type NOT_FOUND.TYPE_NOT_FOUND, a missing action type NOT_FOUND.ACTION_TYPE_NOT_FOUND, too many hops INVALID_ARGUMENT.TOO_MANY_HOPS, an action over 10,000 edits ACTION_VALIDATION_FAILED.EDIT_LIMIT_EXCEEDED, an edit that leaves a required property empty ACTION_VALIDATION_FAILED.REQUIRED_PROPERTY, a form's stale object CONCURRENCY_CONFLICT.STALE_OBJECT and an object that kept changing through automatic retries CONCURRENCY_CONFLICT.OBJECT_CHANGED
  • Scheduling boards, attachments, discussion, the directory, retention and erasure, solution packages, monitors, inbound push and pipeline operations add the reasons listed under reasons by feature
On request
  • The other codes and reasons on this page, the Retry-After header, and the template, instance and traceId fields

General codes

Codes the platform service returns across many features, with examples of what returns each

CodeStatusReturned for
NOT_FOUND404An object, type, action type, dataset, branch or pipeline that does not exist or that the caller cannot see, with reasons such as OBJECT_NOT_FOUND, TYPE_NOT_FOUND and DATASET_NOT_FOUND
FAILED_PRECONDITION409The resource or the service is not in a state that allows the request, as a 409 or, for some features, a 400, 412, 422 or 503: a closed branch or change set, a schedule draft whose moves break a hard rule, a definition locked by a solution package, edge agent keys not set up, Node.js not installed for TypeScript functions
ALREADY_EXISTS409An edge agent, pipeline or grant that is already there
CONFLICT409A folder already loading, a draft that changed since it was opened, a pipeline already building (RUN_IN_PROGRESS), an alert already resolved
ABORTED409An agent team member stopped by the team's limit
UNAVAILABLE503A dependency that cannot be reached or is not ready, such as lakeFS, the shared stream log, an embedding model still loading, or an inbound source whose secret is not set (SECRET_MISSING)
RESOURCE_EXHAUSTED429A model provider's rate limit
DEADLINE_EXCEEDED408A pipeline preview or SQL workspace query that ran past its time
MEMORY_LIMIT_EXCEEDED507A TypeScript function past its heap limit
FUNCTION_READ_LIMIT429A TypeScript function past its reads per call
DATA_LOSS500A sealed value that does not open with its key (SEALED_VALUE_INVALID)
AGENT_FAILED502An agent started by an automation that failed (AGENT_RUN_FAILED)
MODEL_STEP_FAILED502An AI function's model step that failed with no fallback step (NO_FALLBACK)
MODEL_OUTPUT_INVALID502Document extraction whose model reply is not valid JSON (JSON_INVALID)

Codes at a glance

The first group is what the REST API returns as application/problem+json. The last four are not HTTP errors: they describe how an agent run, a pipeline build, a sync job or a writeback ended, and they appear in run results, build records, webhook payloads and the operational tables. Each code links to its full entry

Code and statusIn shortRetry
INVALID_ARGUMENT
400
The request is malformed or names something that is not thereNo
UNAUTHENTICATED
401
No valid tokenAfter refreshing the token
PERMISSION_DENIED
403
Missing role, scope or access labelNo
IDEMPOTENCY_KEY_REUSED
409
Same key, different bodyNo
PAYLOAD_TOO_LARGE
413
A file, row push or delivery over its limitNo
RATE_LIMITED
429
A stream, webhook, model capacity or retention run limit was reachedYes, with backoff
INTERNAL
500
An unexpected platform errorYes, with backoff
SERVICE_UNAVAILABLE
503
A dependency is briefly unavailableYes, with backoff
OBJECT_TYPE_NOT_FOUND
404
No such type, or not visibleNo
OBJECT_NOT_FOUND
404
No such object, or not visibleNo
PAGE_TOKEN_EXPIRED
410
Page token older than its lifetimeRestart from the first page
CHANGE_CURSOR_EXPIRED
410
Change feed cursor older than the type's version historyAfter resyncing from a snapshot
ONTOLOGY_REVISION_INCOMPATIBLE
412
The client was built against an older revisionAfter regenerating the client
QUERY_TOO_COMPLEX
422
A query over the query service's limitsNo
ACTION_TYPE_NOT_FOUND
404
No such action type, or not visibleNo
ACTION_VALIDATION_FAILED
422
Parameters or action conditions failedNo
CONCURRENCY_CONFLICT
409
An object moved under the actionAfter re-reading
EDIT_LIMIT_EXCEEDED
422
Too many edits, objects or parameter setsNo
ACCESS_NOT_REQUESTABLE
422
An item or prerequisite cannot be requestedNo
ACCESS_ALREADY_HELD
409
The caller already holds every itemNo
ACCESS_REQUEST_DUPLICATE
409
A pending request for the same items existsNo
CERTIFICATION_CHECKS_FAILED
422
A certification check failedAfter fixing the checks
DEPRECATION_SCHEDULE_TOO_SHORT
422
Removal comes too soon after the deprecationNo
TAG_RULE_FAILED
422
A tag value needs an access label the resource does not carryNo
FUNCTION_TIMEOUT
504
A function ran past its timeoutNo
FUNCTION_FAILED
500
A function threw or ran out of memoryNo
FUNCTION_VERSION_RETIRED
410
The requested function version is retiredAfter changing the pinned version
NO_ELIGIBLE_ROUTE
422
No model route is cleared for the data in the callNo
MODEL_BUDGET_EXCEEDED
429
A model budget is used upNot before the budget resets
AGENT_LIMIT_REACHED
Run outcome
An agent run hit its step, time, token, cost or proposal limitNo
BUILD_BLOCKED
Build outcome
A blocking check failedOn the next build, after a fix
SYNC_STALLED
Sync state
A connector or sync job stopped advancingResumes by itself once fixed
WRITEBACK_FAILED
422, 502 or 503 before the edits; writeback outcome after
A system of record did not accept the call or the edits503 with backoff; after the commit, from the dead-letter queue

The problem body

API errors follow RFC 9457 problem details. The body below is what a client gets when it applies place-hold to batch B-0841 when the batch is already on hold. Every invalid parameter is reported in one response, so a form can show them together instead of one per submit. Conditions are evaluated once every parameter is valid, and every failed condition is reported together

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/problem+json
X-Request-Id: req_01M5Y20VY0Y6DNWWNGJJM85G2W
traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01

{
  "type": "https://docs.marklandstreet.com/errors#ACTION_VALIDATION_FAILED",
  "title": "Action validation failed",
  "status": 422,
  "code": "ACTION_VALIDATION_FAILED",
  "reason": "ACTION_VALIDATION_FAILED.CONDITION_FAILED",
  "detail": "B-0841 is already on hold",
  "params": {},
  "errors": [
    {
      "condition": "notHeld",
      "message": "B-0841 is already on hold",
      "reason": "CONDITION_FAILED"
    }
  ],
  "retryable": false,
  "requestId": "req_01M5Y20VY0Y6DNWWNGJJM85G2W"
}

A missing parameter is reported the same way, with the top-level reason ACTION_VALIDATION_FAILED.PARAMETER_INVALID and an entry like this for each parameter

{
  "parameter": "reason",
  "result": "INVALID",
  "required": true,
  "reason": "PARAMETER_MISSING",
  "message": "reason is required"
}

On request, the body also carries template, instance and traceId, its top-level params hold the counts behind the message, such as { "actionType": "place-hold", "failed": 1, "evaluated": 2 }, and each entry in errors carries its own params and template, such as "{batch} is already on hold"

Fields

FieldTypeDescription
typeURIThe error code's page, anchored at the code. Stable, so it can be used as a key as well as a link. For example https://docs.marklandstreet.com/errors#CONCURRENCY_CONFLICT
titleStringA short summary of the code for people. Wording may change. For example "Action validation failed"
statusIntegerThe HTTP status, repeated in the body for clients that lose headers. For example 422
codeStringThe stable code. Branch on this first. For example "ACTION_VALIDATION_FAILED"
reasonString or nullThe stable reason within the code, written CODE.REASON, or null. For a failed validation it is CONDITION_FAILED when a condition failed, and PARAMETER_INVALID when a parameter did. For example "ACTION_VALIDATION_FAILED.CONDITION_FAILED"
detailStringThe message for this occurrence, the first failure's message when there are several; on request, rendered from template and params. Never parse it. For example "reason is required"
templateStringOn request: the message with named placeholders in braces, for clients that render their own wording or another language. For example "{failed} of {evaluated} checks failed on {actionType}"
paramsObjectThe named values behind the message. Names are fixed per reason; values are typed (numbers, timestamps, keys). For example { "failed": 2 }
retryableBooleanWhether the same request could succeed unchanged later. A hint that agrees with the tables below. For example false
instanceStringOn request: the path that failed, such as "/api/v2/actions/place-hold:run"
requestIdStringQuote it to support. It is also on the X-Request-Id header and in the audit entry. For example "req_01M5Y20VY0Y6DNWWNGJJM85G2W"
traceIdStringOn request: the W3C trace id, the same one returned on traceparent, such as "4bf92f35…"
errorsArrayPresent when one request fails in several places. Each entry has its own reason and message, parameter or condition, and on request its own params. Parameters come first, then conditions in definition order; conditions are evaluated only when every parameter is valid. See the example above

Reasons and parameters

A code says what kind of failure happened and what a client should do about it. A reason says which variant, when the fix differs between variants. CONCURRENCY_CONFLICT.STALE_OBJECT means a form showed a person old data and they need to see the new state; CONCURRENCY_CONFLICT.OBJECT_CHANGED means an object is so busy that three automatic reruns lost the race, and a short wait usually fixes it. Codes without variants have a null reason

Parameter names are fixed for each reason. New parameters may be added to a reason, so read the ones you need and ignore the rest. Message templates name only parameters that exist, and a parameter whose value the caller may not see is rendered as restricted rather than left out, so a message never reveals more than the caller could read and never changes shape depending on who reads it

What may change and what may not

Within API v2 we never rename a code, a reason or a parameter, and never move a code to another status. We may add codes and reasons at any time, as additions. A client that meets a reason it does not know should fall back to the code, and one that meets a code it does not know should fall back to the status class: 4xx means change the request, 5xx means back off and retry

Request, access and availability codes

INVALID_ARGUMENT

400Retry: noAny endpoint

The request cannot be understood as sent. Fix the request; repeating it unchanged always fails the same way

In the platform service, reasons include UNKNOWN_PROPERTY (params property and type, also returned for a property hidden from the caller), INVALID_FILTER, UNKNOWN_OPERATOR, UNKNOWN_LINK, LINK_NOT_ON_TYPE, TOO_MANY_HOPS, INVALID_PAGE_TOKEN, QUERY_FAILED (a filter value the query cannot compare), FUNCTION_ARGUMENTS, BAD_EXPECTED_VERSION (an expectedVersions entry not written "type:key") and, for a metric read over its period, group or nesting limit, QUERY_TOO_COMPLEX. A body that is not JSON gets the framework's 422, and a pageSize over 1,000 is read as 1,000

ReasonParamsCauseFix
INVALID_FILTERpath, operator, propertyTypeAn operator that does not apply to the property, such as $lt on a string or $near on a numberUse an operator for that base type, listed on object sets

UNAUTHENTICATED

401Retry: after refreshing the tokenAny endpoint

The platform could not tell who is calling. The response also carries a WWW-Authenticate: Bearer error="invalid_token" header with a short description

The platform service returns these reasons

  • Tokens and people: TOKEN_MISSING, TOKEN_EXPIRED (param expiredAt), TOKEN_INVALID, UNKNOWN_PRINCIPAL for a signed-in person who is not a user of the ontology, USER_DEACTIVATED for someone the directory turned off, TOKEN_REVOKED for a token issued before their cut-off, SCIM_CLIENT_UNKNOWN on /scim/v2, and STREAM_TICKET_INVALID
  • Signed inbound deliveries: SIGNATURE_MISSING, SIGNATURE_INVALID or TIMESTAMP_OUT_OF_RANGE
  • Edge agents: EDGE_SIGNATURE_MISSING, EDGE_SIGNATURE_INVALID, EDGE_CLOCK_SKEW, EDGE_CERT_MISMATCH or EDGE_REPLAYED
ReasonParamsCauseFix
TOKEN_MISSINGNoneNo Authorization headerSend Bearer <access token> on every call
TOKEN_EXPIREDexpiredAtAccess tokens last 60 minutesRefresh and retry once. The clients call your token function before every request
TOKEN_INVALIDNoneA bad signature, a token for another tenant or a revoked tokenRequest a new token from this tenant's token endpoint
USER_DEACTIVATEDNoneAn administrator, the identity provider over SCIM or the inactivity timer turned the person off. Refused from the next requestDo not retry; an administrator reactivates the person if that was a mistake
TOKEN_REVOKEDNoneWith sign-on, a token issued before the person's cut-off, still refused after they are reactivatedSign in again for a new token

PERMISSION_DENIED

403Retry: noAny endpoint

The platform knows who is calling, and that principal may not do this. The error names what is missing only when the thing that is missing is visible metadata, such as a role on a project or an access label on an action type. It never says which hidden object caused a refusal

In the platform service, reasons include

  • ADMIN_ONLY, ACTION_NOT_PERMITTED (the action's allowed groups), ACCESS_LABEL_NOT_HELD, APPROVAL_REQUIRED and REVERT_NOT_PERMITTED
  • For agents: TOOL_NOT_ALLOWED and AGENT_NOT_ALLOWED
  • For the operational tables and SQL: OPS_GRANT_REQUIRED and TABLE_GRANT_REQUIRED
  • NOT_OWNER, NOT_EDITOR, SELF_APPROVAL, NOT_APPROVER, CERTIFIER_ONLY, TAG_SETTER_ONLY and TENANT_MISMATCH
  • The feature reasons under reasons by feature, such as FILE_UPLOAD_NOT_PERMITTED, COMMENT_NOT_YOURS, SCIM_NOT_PERMITTED, RETENTION_MANAGER_ONLY, PRIVACY_OFFICER_ONLY, SECOND_PERSON_REQUIRED, PACKAGE_UNSIGNED, MONITORS_VIEWER_ONLY and ROLLBACK_NOT_ALLOWED

On request, reasons that name a missing role, scope or access label, with a link to request it

IDEMPOTENCY_KEY_REUSED

409Retry: noState-changing POSTs

Reason BODY_MISMATCH, params key and firstUsedAt. The key was used in the last 24 hours with a different body. A repeat with the same body returns the original response instead, and a repeat that arrives while the first request is still running waits for it and returns its result. Fix: derive the key from what the request means, for example hold-B-0840-20261029, and never reuse a key for a different request

PAYLOAD_TOO_LARGE

413Retry: noUploads and large bodies

The platform service returns PAYLOAD_TOO_LARGE.TOO_MANY_ROWS for a trained model prediction over 1,000 rows or an inbound row push over its maxRows, DELIVERY_TOO_LARGE for a signed inbound delivery over its limit, and FILE_TOO_LARGE (param limit) for an attachment upload over files.maxSize, 200 MB by default. A file over a folder's or an edge batch's size limit is INVALID_ARGUMENT with status 413 and reason FILE_TOO_LARGE or EDGE_BATCH_TOO_LARGE. On request, a size limit on every request body

RATE_LIMITED

429Retry: yes, with backoffAny endpoint

The platform service returns STREAM_LIMIT and STREAM_LIMIT_PER_USER for open live streams, WEBHOOK_LIMIT for webhook subscriptions, TENANT_CALLS_PER_MINUTE and TENANT_DAILY_TOKENS for a catalogue model's capacity, and RETENTION_RATE_LIMITED for a retention policy run by hand more than once a minute. Agent runs add AGENT_QUEUE_FULL, AGENT_PER_PERSON, BATCHES_FULL and BATCHES_PER_PERSON, described under reasons by feature. No Retry-After is sent; back off. On request, request rate limits per client and per tenant, with headers that say how much is left

INTERNAL

500Retry: yes, with backoffAny endpoint

No reason and no params beyond requestId. Something failed that the platform did not expect, and it was not your request's fault. Nothing was committed: actions are atomic, so an INTERNAL on an apply means no edits landed unless a retry with the same idempotency key returns a result. The request id is enough for us to find the failure; you do not need to send the body

In the platform service, INTERNAL carries a reason when the service knows the cause: AUTH_MISCONFIGURED, KEYS_MISCONFIGURED, RELOAD_FAILED, MODEL_TEXT_EDIT_FAILED, EDGE_LANDING_FAILED, and RELAY_BAD_REPLY with status 502. An exception the service did not expect returns a plain-text 500 Internal Server Error without a problem body; the request id is still on X-Request-Id

SERVICE_UNAVAILABLE

503Retry: yes, with backoffAny endpoint

The platform service returns these reasons

  • DEPENDENCY_UNAVAILABLE: the identity provider did not answer
  • AUDIT_CONTENDED: the audit log was busy; retryable
  • DIRECTORY_CONTENDED: another copy was writing the directory; retryable
  • COMMIT_BUSY: the service was busy committing another change; retryable, nothing was committed
  • SHUTTING_DOWN: the copy is stopping; retryable
  • TENANT_KEY_UNAVAILABLE
  • PROVIDER_ERROR and PROVIDER_UNREACHABLE from a model provider

A dependency that is not ready, such as the branch store or an embedding model still loading, is UNAVAILABLE

ReasonParamsCauseFix
DEPENDENCY_UNAVAILABLEserviceA platform service is restarting or failing over, typically for secondsRetry with backoff and jitter

Object and query codes

OBJECT_TYPE_NOT_FOUND

404Retry: noTypes, objects, queries

No reason. Params objectType and revision. The type does not exist on that revision or branch, or the caller has no role that lets them see it. The two cases are reported identically. Check the ID, which is kebab case such as silo-draw, and the revision parameter if you are reading a branch

The platform service returns NOT_FOUND.TYPE_NOT_FOUND with param type, for a type that does not exist or carries an access label the caller does not hold

OBJECT_NOT_FOUND

404Retry: noObjects, links, action parameters

No reason. Params objectType and key. No object with that key exists, or row access or an access label hides it from the caller. The two cases are deliberately indistinguishable, so that probing keys reveals nothing. When an object you expect is missing, ask someone with the Owner role on the type to run access explain for you, or check the type's Sync tab for rejected rows. An action that names an invisible object as a parameter fails with this code, never with a permission error

The platform service returns NOT_FOUND.OBJECT_NOT_FOUND with params type and key. An action parameter that names an object the caller cannot see, or one outside their row policies, fails with ACTION_VALIDATION_FAILED.PARAMETER_INVALID and the message "<type> <key> not found", still never a permission error

PAGE_TOKEN_EXPIRED

410Retry: restart from the first pagePaged lists and loads

On request, with page tokens that pin a snapshot; today page tokens do not expire. A walk that outlasts its token, usually because the client does slow work between pages, must start again. Fix: fetch all pages first and process afterwards, raise pageSize to 1,000, or for exports read the open tables directly

CHANGE_CURSOR_EXPIRED

410Retry: after resyncing from a snapshotChange feeds

On request; today a change feed reads from any table version still in the lake. A cursor older than the type's version history can no longer say what happened since. Rebuild the copy from a consistent read and resume the feed from there. See change capture

ONTOLOGY_REVISION_INCOMPATIBLE

412Retry: after regenerating the clientSDK and pinned clients

On request; the clients today send no revision. The generated SDK sends the revision it was built from, and a merge since then removed or changed something the call uses. Additive changes never cause this error. Fix: regenerate the client and update the code that used what changed

QUERY_TOO_COMPLEX

422Retry: noSearch, query, aggregate

On request, a QUERY_TOO_COMPLEX code for a query the query service refuses rather than let it slow every other reader. Today more than 3 follow steps is INVALID_ARGUMENT.TOO_MANY_HOPS (400), and a metric read over its period, group or nesting limit is INVALID_ARGUMENT.QUERY_TOO_COMPLEX (400)

Action codes

ACTION_TYPE_NOT_FOUND

404Retry: noActions

No reason. Params actionType and revision. The action type does not exist, is a draft and the caller is not among the groups that can see it, or the caller has no role on its project. Retiring action types still apply and are not reported here

The platform service returns NOT_FOUND.ACTION_TYPE_NOT_FOUND with param action, also for an action type whose object type or access label the caller cannot see

ACTION_VALIDATION_FAILED

422Retry: noRun, run batch, check

Parameters or action conditions failed, and nothing was committed. Every failure is listed in errors, each with its own reason. Call :check first to get the same results without committing, which is what forms do while a person types. On request, values that a condition compared are returned in params only to callers with edit rights on the action type; others get the message

In the platform service

  • The top-level reason is CONDITION_FAILED or PARAMETER_INVALID, and each entry in errors has PARAMETER_MISSING, PARAMETER_INVALID, PARAMETER_UNKNOWN or CONDITION_FAILED
  • An entry for a value type also carries valueType and constraint, and one for an interface parameter objectReason
  • The edits an action computes can fail as VALUE_TYPE_CONSTRAINT, REQUIRED_PROPERTY, UNKNOWN_PROPERTY or EDIT_LIMIT_EXCEEDED, and the files an edit puts on an object as FILE_INVALID, FILE_NOT_ATTACHABLE, FILE_TYPE_NOT_ACCEPTED or FILE_ATTACH_LIMIT, each entry in errors naming the objectType, primaryKey and property
  • An action whose allowed groups leave the caller out returns PERMISSION_DENIED.ACTION_NOT_PERMITTED instead
  • A TypeScript function that throws FunctionError returns FUNCTION_FAILED.USER_FACING_ERROR (422) with its message
ReasonParamsCauseFix
PARAMETER_MISSINGparameterA required parameter was not sentSend it; GET /actions/{action} lists which are required
PARAMETER_INVALIDparameter, constraint, plus min, max, options or patternA value outside its constraint, for example a start other than "In 1 hour", "In 3 hours" or "Tonight 22:00"Offer only the allowed values in the form
CONDITION_FAILEDcondition, plus the condition's own template parametersAn action condition evaluated to false, for example notHeldShow the message. The state of the world has to change, or a person who meets the condition has to act
REQUIRED_PROPERTYobjectType, primaryKey, property, one entry per empty propertyA create that leaves a property marked required: true unset, or a modify that sets it to null, an empty string or an empty list. Checked on every edit, from rules and functions alike, before anything is committedSet the value in the rule or the form, or make the parameter that feeds it required
FUNCTION_REJECTEDfunction, versionOn request. A function that computes the edits rejected the input with a message meant for the personShow the message as written; it comes from the function's author

CONCURRENCY_CONFLICT

409Retry: after re-readingRun, run batch

An object the action read or wrote changed before the commit. The action service reruns the apply against the new state where it can; this error means it could not or should not

In the platform service, this code means the state something was decided on has moved

  • On a proposal: PROPOSAL_DECIDED and PROPOSAL_EXPIRED
  • On an undo: ALREADY_REVERTED, IS_A_REVERT, REVERT_CONFLICT and TYPE_REMOVED
  • For a create on a key that exists: ALREADY_EXISTS
  • On a dashboard or app saved from an older version: STALE_VERSION and STALE_REVISION
  • Also BRANCH_CONFLICT, BRANCH_EXISTS, MODEL_CHANGE_CONFLICT, AUTOMATION_EXPIRED and DEFINED_IN_ONTOLOGY
  • On an apply: STALE_OBJECT and OBJECT_CHANGED, below

PROPOSAL_DECIDED is how two people approving at once is settled: the first decision runs, and the second gets this reason. In both apply reasons each entry in errors carries objectType, objectKey, expectedVersion and version (null when the object was deleted)

ReasonParamsCauseFix
STALE_OBJECTIn errors: objectType, objectKey, expectedVersion, versionThe request sent options.expectedVersions, such as {"batch:B-0840": 7}, and the object has moved on. No automatic rerun happens, because the person decided on what they sawReload the object, show the person what changed and let them apply again
OBJECT_CHANGEDIn errors: objectType, objectKey, expectedVersion, versionAn object the action's parameters read kept changing after automatic retries, usually a hot object such as a delivery that many top-ups are being added toRetry once after 1 to 2 s with jitter. If it recurs, serialize the writers, for example one automation per delivery
PROPOSAL_DECIDEDNoneSomeone else approved or rejected the proposal first. It ran once, as the first decisionRead the proposal again to see who decided and what ran

EDIT_LIMIT_EXCEEDED

422Retry: noRun, run batch

In the platform service, an apply over 10,000 edits is ACTION_VALIDATION_FAILED.EDIT_LIMIT_EXCEEDED. A batch runs each parameter set on its own and reports each one's result. On request, the code EDIT_LIMIT_EXCEEDED with limits on batches

Access request and certification codes

Returned by the access request and certification endpoints. Refusals that depend on who is calling, such as approving your own request, are reasons under PERMISSION_DENIED

In the platform service

  • Access requests return ALREADY_EXISTS.ALREADY_GRANTED for something the caller already has, PERMISSION_DENIED.ACCESS_LABEL_NOT_REQUESTABLE or GROUP_NOT_REQUESTABLE for an item that can't be requested, PERMISSION_DENIED.SELF_APPROVAL, NOT_APPROVER and REQUESTER_ONLY, and FAILED_PRECONDITION.REQUEST_CLOSED and GRANT_ENDED
  • Certification returns PERMISSION_DENIED.CERTIFIER_ONLY and INVALID_ARGUMENT.MISSING_REASON, INVALID_SCHEDULE or INVALID_REPLACEMENT, and a new use of a deprecated item FAILED_PRECONDITION.DEPRECATED_NO_NEW_USES
  • Tags return INVALID_ARGUMENT.TAG_VALUE_NOT_ALLOWED and PERMISSION_DENIED.TAG_SETTER_ONLY

The codes in this section are delivered on request

ACCESS_NOT_REQUESTABLE

422Retry: noAccess requests

No reason. Params items, and blocking when the caller may see the item that blocks. An item or one of its prerequisites cannot be requested, usually an access label whose steward keeps it out of self-service, such as PII. Ask an Administrator, who adds the membership outside the request flow with the steward's recorded approval. See access labels that can't be requested

ACCESS_ALREADY_HELD

409Retry: noAccess requests

No reason. Param items. The caller already holds every item in the request, so there is nothing to ask for. If a screen still refuses them, the refusal comes from something else, such as an access label or a row policy; run access explain to find it

ACCESS_REQUEST_DUPLICATE

409Retry: noAccess requests

No reason. Param request, the id of the pending request for the same items, which the response also links to. Wait for its decision, or withdraw it and submit a new one with a different duration or reason

CERTIFICATION_CHECKS_FAILED

422Retry: after fixing the checksCertification

No reason. Params resource, failed and evaluated. Setting a resource to Certified ran the certification checks and at least one failed, so the status did not change. errors lists each failing check with its name and fix, such as a missing description or a blocking key check. Run :check first; every check is something an owner can fix without a certifier

DEPRECATION_SCHEDULE_TOO_SHORT

422Retry: noCertification

No reason. Params removeOn, minDays and dependents. A deprecation schedule removes the resource less than 30 days after it is deprecated, or less than 60 days when dependents are owned by other teams. Move the removal date, so people downstream have a known amount of time to move

TAG_RULE_FAILED

422Retry: noTags, certification

No reason. Params tag, value and accessLabel. A controlled tag value requires an access label the resource does not carry, for example classification: restricted without QUALITY. A tag rule never applies an access label for you: an owner or steward adds the access label on purpose, or the tag value is corrected

Function, agent and model codes

FUNCTION_TIMEOUT

504Retry: noFunctions, actions, derived properties

No reason. Params function, version, timeoutMs and maxMs. A function ran past its timeout, 60 s by default and 300 s at most. A retry runs the same work against the same data and times out again. Read the function's trace to see where the time went; most timeouts are a loop of single-object loads that should be one object set query. Raise the timeout in the function version's configuration only after that

In the platform service, a TypeScript function past its time returns reason FUNCTION_TIMEOUT with param timeoutMs, 5 s by default and 30 s at most. An AI function past its timeoutMs, 60 s by default and 300 s at most, returns the code with a null reason. Python functions have no timeout. The function, version and maxMs params are delivered on request

FUNCTION_FAILED

500Retry: noFunctions, actions, derived properties

The function's own code failed. Nothing was committed. On request, callers see a generic message and the stack trace goes to the function's owners and to the trace

In the platform service, the detail carries the exception's type and message. Reasons are UNCAUGHT_EXCEPTION, USER_FACING_ERROR with status 422 for a TypeScript FunctionError, PROCESS_FAILED, RESULT_NOT_JSON, RESULT_TOO_LARGE (a message over 16 MB), CALL_DEPTH, INVALID_EDIT_SEQUENCE and AI_FUNCTION_FAILED. A TypeScript function past its heap limit, 128 MB by default and 1 GB at most, returns MEMORY_LIMIT_EXCEEDED (507), and one past 500 reads in a call FUNCTION_READ_LIMIT (429)

ReasonParamsCauseFix
UNCAUGHT_EXCEPTIONfunctionThe function threwFix the function, or throw a FunctionError so the call returns FUNCTION_FAILED.USER_FACING_ERROR with a useful message
INVALID_EDIT_SEQUENCENoneAn edit function returned an edit that is not a modify, create or delete with a type and keyFix the function

FUNCTION_VERSION_RETIRED

410Retry: after changing the pinned versionFunctions

On request; today a pin that no version matches returns NOT_FOUND.FUNCTION_VERSION_NOT_FOUND. The caller pinned a version that has been retired. Move the pin to a current version

NO_ELIGIBLE_ROUTE

422Retry: noAI functions, agents, Assistant

The model gateway found no route allowed to take the call, so it refused it rather than send data somewhere it should not go. Reason ACCESS_LABEL_NOT_CLEARED (params taskClass, accessLabels) means no target on the route is cleared for an access label in the context, typically QUALITY. Reason RESIDENCY (params taskClass, region) means no target serves the tenant's data residency. Add a cleared target, such as a model you run, to the route. If every target is merely down, the code is SERVICE_UNAVAILABLE instead

In the platform service, reasons are NO_PROVIDER (no model provider or key configured), PROVIDER_AUTH, UNKNOWN_TIER, REDACTION_FAILED, FILES_NOT_ACCEPTED, FILES_NOT_REDACTABLE, and MODEL_UNKNOWN, MODEL_DISABLED or MODEL_RETIRED for a model in the catalogue. Agents with a playbook run it instead. ACCESS_LABEL_NOT_CLEARED and RESIDENCY are delivered on request

MODEL_BUDGET_EXCEEDED

429Retry: not before the resetAI functions, agents, Assistant

A model budget was used up and the gateway refused the call before it left the platform, so nothing was sent and nothing was charged. On request, Retry-After is set to the time the budget resets, which can be days away, so the SDK never retries this code. Every reason has the params budgetCad and budget, an object with id, scope, window, limitCad, usedCad and resetsAt; on request, approvers names the group that can grant an override. Verified Assistant answers make no model call and never see this code. See model usage and budgets

In the platform service, the reason names the budget's scope and window: TENANT_MONTHLY, TENANT_DAILY, AGENT_MONTHLY, AGENT_DAILY, PERSON_MONTHLY or PERSON_DAILY. On request, budgets per call and per cost attribution tag

On request, inside an agent run, the run ends at the current step boundary as a limit ending (AGENT_LIMIT_REACHED.COST_LIMIT) with this code as its stop reason. A stopped run is not resumed after an override; start it again. In the platform today, an agent with a playbook runs the playbook instead, and one without ends failed with this code in its error

AGENT_LIMIT_REACHED

Run outcomeRetry: noAgent runs

Not an HTTP error. The run ended on a limit. It keeps its full reasoning trace and leaves any proposals it already staged in the approval inbox. Running it again unchanged usually ends the same way

In the platform service, POST /api/v2/agents/{agent}/runs answers at once with the run (202), or with the finished run (200) when it ends within ?wait=. A run that reaches its step limit, 16 by default and 64 at most, ends with status limit_reached, and a team over its costLimitCad with cost_limit_reached, in the response and in ops.agent_runs.status. Read the trace before raising the step limit; a tool that returns too much or too little is the usual cause, see troubleshooting. On request, this code with a reason per limit, and limits on time, tokens and proposals

Pipeline, sync and writeback codes

These codes describe work that happens after an API call has returned, or without one. They appear on the build, sync and writeback screens in Build and Data, in the webhook events listed for each, and in the operational tables, for example as CODE.REASON in the error_code column of ops.sync_runs

In the platform service

  • A blocked pipeline build returns BUILD_BLOCKED as an HTTP 409, with reasons such as EXPECTATION_FAILED, INPUT_MISSING, SQL_FAILED, SQL_NOT_ALLOWED, DEPENDENCY_CYCLE and ENGINE_UNAVAILABLE, and a failed build is a pipeline.build.failed event from ops.pipeline_runs
  • Builds are all or nothing: each step's result is held until every step has passed, so a failed build changes no output, and ops.pipeline_runs names the failed_step
  • Schema contracts add INPUT_CONTRACT and OUTPUT_CONTRACT, and a quarantine replay that no longer fits its step REPLAY_INVALID
  • A second build of a pipeline already building waits briefly, then gets CONFLICT.RUN_IN_PROGRESS (409)
  • A failed sync is a sync.failed event, and the source rows a sync refuses are counted in ops.sync_runs.rows_rejected and listed, the first 50, in its rejections column with key and reason: KEY_MISSING, DUPLICATE_KEY, REQUIRED_PROPERTY or UNREADABLE
  • A writeback row that fails 5 attempts, or that a real system refused outright, moves to dead_letter in ops.writeback_outbox with its last_error, and sends writeback.failed
  • WRITEBACK_FAILED is an HTTP error for a call made before an action's edits, below

SYNC_STALLED, UPSTREAM_HELD and the error_code column are delivered on request

BUILD_BLOCKED

Build outcomeRetry: on the next buildpipeline.build.failed
ReasonParamsCauseFix
EXPECTATION_FAILEDdataset, build, expectation, observedA blocking check failed. The dataset and its objects stay on the last good version, marked staleFix the source or the step. An Owner on the pipeline can override one build with a written reason
INPUT_CONTRACT, OUTPUT_CONTRACTdataset, contract, violationsAn input or output schema no longer matches the one its schema contract holds, under the mode exact, exactAnyOrder, additions or additionsKeptFix the source or the step, or accept the new schema with POST /api/v2/schema-contracts:accept
UPSTREAM_HELDdataset, upstreamOn request as a reason. A dataset this pipeline reads is itself blocked. Built today: a scheduled pipeline that reads from one that failed or was skipped in the same pass is skipped, with the reason in its schedule state and the audit logFix the upstream build; held pipelines run in dependency order once it passes

SYNC_STALLED

Sync stateResumes once fixedsync.lag.exceeded

A connector or a sync job stopped advancing its cursor. Param stage says which, with the same values as ops.sync_runs.stage: connector for the source position, sync for the dataset version the sync service has checkpointed. Objects keep serving their last good state throughout

ReasonParamsCauseFix
SOURCE_UNREACHABLEconnector, sinceThe source or the edge agent in front of it cannot be reachedCheck the edge agent and the source's credentials
SOURCE_LOG_TRUNCATEDconnector, table, positionThe change data capture position is no longer in the source's log, usually after a long outage or a log cleanupTake a new snapshot of the table from the connector
DUPLICATE_PRIMARY_KEYobjectType, datasetVersion, keysOne dataset version holds two rows for one keyFix the pipeline's key logic; the job resumes on the next commit

WRITEBACK_FAILED

422, 502, 503 or writeback outcomeRetry: 503 with backoff; otherwise from the dead-letter queuewriteback.failed

In the platform service this code is also an HTTP error. A writeback entry with when: before calls the system inside the run, before any edit; when that call fails, nothing is edited and the person sees the system's own message. The status says what kind of failure it was

  • 422 when the system refused the call (reason SYSTEM_REFUSED)
  • 503 and retryable: true when it was unavailable or too slow (SYSTEM_UNAVAILABLE, SYSTEM_UNREACHABLE, CALL_TIMEOUT or RATE_LIMITED)
  • 502 otherwise (OUTPUT_MISSING, HOST_NOT_ALLOWED, SECRET_MISSING, INPUT_MISSING, INPUT_INVALID, INPUT_UNKNOWN)

Each entry in errors names the system, operation, the system's status and its message. When the run fails after a call was made, the call is undone through its operation's undo; one with no undo is added to errors with reason NOT_UNDONE and audited as writeback.before.undone, for a person to put right in that system. On a data branch, an action with such an entry is refused as FAILED_PRECONDITION.BRANCH_NO_CALLS, because a branch makes no outside calls

After the commit, committed edits did not reach a system of record. A temporary failure follows the outbox retries and a permanent one, a refusal by the system, is a dead letter at once. The edits stay committed in the Ontology; the row waits in the dead-letter queue, and the affected property shows a "Not written to ERP" marker until someone resolves it. Every reason carries connector and actionLogId

ReasonExtra paramsCauseFix
TARGET_REJECTEDtargetStatus, targetMessageThe target answered 400, 422 or a business rule refusal. Dead-lettered at onceFix the cause in the target, then retry; or revert the action
TARGET_CONFLICTtargetReferenceThe target record changed since the Ontology last read itRetry after source refresh, which re-runs the conflict check
RETRIES_EXHAUSTEDattempts, firstAttemptAtTransient failures for 5 attempts in the platform service; on request, for 72 hours from the first attemptFix the target's availability, then retry the dead letters

Reasons by feature

Each feature below returns the general codes with reasons of its own. The full rules are on each feature's page

Code and reasonsMeans
Scheduling boards
FAILED_PRECONDITION.SCHEDULE_RULES_FAILED (409)Submit refused: a moved task breaks a hard rule or changed since its move was staged. Nothing was applied; each problem is in errors with reason SCHEDULE_RULE_FAILED, the task and the rule
FAILED_PRECONDITION.SCHEDULE_DRAFT_CLOSED, SCHEDULE_NOTHING_STAGED, SCHEDULE_NOTHING_TO_UNDO (409), SCHEDULE_INVALID (412)The draft was submitted or discarded, has no moves, has nothing left to undo, or the board's definition does not load
NOT_FOUND.SCHEDULE_NOT_FOUND, SCHEDULE_DRAFT_NOT_FOUND, SCHEDULE_MOVE_NOT_FOUND, SCHEDULE_SEARCH_NOT_FOUND; FUNCTION_FAILED.SCHEDULE_FUNCTION_FAILEDA board, draft, move or search that does not exist; a rule, suggest, search or metric function that threw
Attachments
PAYLOAD_TOO_LARGE.FILE_TOO_LARGE (413); INVALID_ARGUMENT.FILE_EMPTY, FILE_MISSING, FILE_NAME_MISSINGAn upload over files.maxSize, or one with no content, no file field or no ?name=
PERMISSION_DENIED.FILE_UPLOAD_NOT_PERMITTED; NOT_FOUND.FILE_NOT_FOUND; FAILED_PRECONDITION.FILE_IN_USE (409)Only people who may run an action that takes a file can upload; a file the caller may not read answers as not found; an attached file or one waiting on a proposal cannot be deleted
INVALID_ARGUMENT.CODE_MISSING, TYPE_NOT_SCANNEDA scan lookup with no code, or for a type capture.scan does not list
Discussion
INVALID_ARGUMENT.COMMENT_EMPTY, COMMENT_TOO_LONG, MENTION_NOT_FOUND, MENTION_LACKS_ACCESSAn empty comment, one over discussion.maxLength, a mentioned object the author cannot see, or a mentioned person who cannot read the thread when mentionsWithoutAccess: refuse
PERMISSION_DENIED.COMMENT_NOT_YOURS; FAILED_PRECONDITION.COMMENT_DELETED (409); NOT_FOUND.COMMENT_NOT_FOUNDOnly the author edits a comment, and the author or an administrator deletes it; a deleted comment cannot be edited
INVALID_ARGUMENT.PREFERENCES_INVALID, PREFERENCE_CATEGORY_UNKNOWN, PREFERENCE_CHANNEL_INVALID; PERMISSION_DENIED.PREFERENCES_OWN_ONLY; INVALID_ARGUMENT.BAD_BEFORENotification preferences outside the categories and the channels app, email and none, or someone else's; an object history page cursor that is not an ISO 8601 time
Directory and SCIM
UNAUTHENTICATED.USER_DEACTIVATED, TOKEN_REVOKED, SCIM_CLIENT_UNKNOWN; PERMISSION_DENIED.SCIM_NOT_PERMITTEDA deactivated person, a token from before their cut-off, a SCIM call without the directory token or a service client token, or a service client without the scim permission. SCIM errors use the SCIM error body, with the reason SCIM_ and the scimType
INVALID_ARGUMENT.INVALID_RULES; SERVICE_UNAVAILABLE.DIRECTORY_CONTENDED (503, retryable)Group-mapping rules that do not parse, or a directory write that met another copy's
Retention
PERMISSION_DENIED.RETENTION_MANAGER_ONLY, RETENTION_EXEMPT_OWNER_ONLY; INVALID_ARGUMENT.RETENTION_POLICY_INVALID, TABLE_PROTECTED, TABLE_REQUIREDOnly retention.managers and administrators run policies and undo marks, and only a table's owner group or administrators exempt it; the audit log, keys and the platform's bookkeeping tables are never covered
FAILED_PRECONDITION.RETENTION_MARK_NOT_WAITING (409); RATE_LIMITED.RETENTION_RATE_LIMITED; NOT_FOUND.RETENTION_POLICY_NOT_FOUND, RETENTION_MARK_NOT_FOUNDA mark already purged or undone; Run now more than once a minute
Erasure requests
PERMISSION_DENIED.PRIVACY_OFFICER_ONLY, SECOND_PERSON_REQUIRED, FILER_ONLY; INVALID_ARGUMENT.IDENTIFIER_REQUIREDOnly erasure.officers and administrators file and decide; the person who filed a request cannot approve it; only the filer withdraws it
FAILED_PRECONDITION.ERASURE_REQUEST_CLOSED, ERASURE_EXTENSION_USED, ERASURE_NOT_FAILED, ERASURE_ALREADY_SHREDDED (409); NOT_FOUND.ERASURE_REQUEST_NOT_FOUND, ERASURE_SUBJECT_NOT_FOUNDA request already decided, a second extension, a run again of a request that has not failed, or a request whose identifiers are already shredded
Solution packages
FAILED_PRECONDITION.PACKAGE_CONTENT_LOCKED (409)A model change to a definition an installed package holds. Detach it from the package first, with a reason
FAILED_PRECONDITION.PACKAGE_INPUTS_NEEDED, PACKAGE_PLAN_BLOCKED, PACKAGE_CHANGE_PENDING (409); ALREADY_EXISTS.PACKAGE_INSTALLEDAn upgrade with a new input to map, a plan with a blocking problem such as PACKAGE_DEPENDED_ON or PACKAGE_CONTENT_IN_USE listed in errors, a package with a change set still open, or an install of a package already installed
PERMISSION_DENIED.PACKAGE_UNSIGNED, PACKAGE_ALTERED, PACKAGE_SIGNER_UNTRUSTEDAn imported file that is not signed, changed after signing, or signed by a key not trusted here. An administrator may override with a reason
Model changes
FAILED_PRECONDITION.MODEL_CHANGE_BLOCKED, MODEL_CHANGE_INVALID, MODEL_CHANGE_NOT_APPROVED, MODEL_CHANGE_STALE, MODEL_CHANGE_RELOAD_FAILED (409)A merge refused by a blocking check, such as EDITS_NOT_CONVERTED for active edits still holding a property's old type, by a missing approval, or by the ontology having moved on
INVALID_ARGUMENT.MODEL_CHANGE_TITLE, MODEL_OP_INVALID, REVIEW_VERDICT_INVALID, REVIEW_EMPTY; FAILED_PRECONDITION.MODEL_CHANGE_CLOSED, MODEL_CHANGE_EMPTY, MODEL_OP_DEPENDED_ON (409); PERMISSION_DENIED.NOT_THE_AUTHOR, NOT_AN_APPROVER, NOT_A_MERGER; NOT_FOUND.MODEL_CHANGE_NOT_FOUND, MODEL_OP_NOT_FOUNDEditing a change set: one with no title, an operation that does not fit, a review without a verdict or text, a change set already merged or discarded, one with no operations to review or merge, removing an operation a later one depends on, someone other than the author changing its operations, or someone outside the changed types' owners reviewing or merging it
Agent runs
RATE_LIMITED.AGENT_QUEUE_FULL, AGENT_PER_PERSON (429, retryable)The copy's queue is full, or the person already has as many runs queued or running as their limit allows (param limit)
FAILED_PRECONDITION.RUN_NOT_WAITING, RUN_FINISHED, NO_ONE_TO_ASK (409); INVALID_ARGUMENT.INVALID_ANSWERS, INVALID_QUESTIONS, ONE_ASK; NOT_FOUND.RUN_NOT_FOUNDAnswering a run that is not waiting, or that another answer resumed first; stopping a run that has ended; answers that do not fit the questions (param question). NO_ONE_TO_ASK, INVALID_QUESTIONS and ONE_ASK go to the model as the tool's result, so it can go on: an ask in a run no one can answer, such as an evaluation, questions that do not fit the format, or more than one ask in one turn
RATE_LIMITED.BATCHES_FULL, BATCHES_PER_PERSON (429, retryable); INVALID_ARGUMENT.INVALID_BATCH, BATCH_TOO_LARGE; FAILED_PRECONDITION.BATCH_FINISHED (409); NOT_FOUND.BATCH_NOT_FOUNDToo many batches running on the copy or for the person (param limit), a batch without a type the caller can see or an input, one over the batch size limit (param limit), or stopping a batch that has ended
Results
PERMISSION_DENIED.RESULTS_OWNER_ONLY; CONCURRENCY_CONFLICT.RESULT_REVERSED (409); NOT_FOUND.RESULT_NOT_FOUND, BRIEF_NOT_FOUNDOnly the owners of results confirm or reject one and generate or read the weekly brief; a result whose action was undone cannot be confirmed or rejected
Pipelines
CONFLICT.RUN_IN_PROGRESS (409)A build of the pipeline is already running in some copy of the service; the request waited a few seconds first, 5 by default
FAILED_PRECONDITION.HISTORY_VACUUMED, DATASET_PROTECTED (409); PERMISSION_DENIED.ROLLBACK_NOT_ALLOWED; NOT_FOUND.VERSION_NOT_FOUND, RUN_DID_NOT_BUILD; INVALID_ARGUMENT.ROLLBACK_TARGET; INTERNAL.ROLLBACK_FAILEDA dataset rollback to a version vacuumed away, of an ops, objects or edits table, by someone outside the pipeline's owner group, to a version or build that does not exist, without a target, or one that failed and was undone
NOT_FOUND.QUARANTINE_NOT_FOUND; FAILED_PRECONDITION.QUARANTINE_STATE, QUARANTINE_SEALED (409); INVALID_ARGUMENT.QUARANTINE_REPLAY_SHAPE, QUARANTINE_ROW_INVALID; PERMISSION_DENIED.QUARANTINE_HIDDEN_COLUMN, PIPELINE_EDITOR_REQUIREDA quarantined row to replay or discard that is missing, already handled, sealed, badly shaped, or sets a column hidden from the caller
NOT_FOUND.CONTRACT_NOT_FOUND; FAILED_PRECONDITION.SCHEMA_NOT_SEEN (409)Accepting a schema for a contract that does not exist, or for a dataset no build has seen yet
Monitors
PERMISSION_DENIED.MONITORS_VIEWER_ONLY; INVALID_ARGUMENT.REASON_REQUIRED, UNTIL_REQUIRED, UNTIL_IN_PAST, UNTIL_TOO_FAR; CONFLICT.ALERT_RESOLVED, NOT_SNOOZEDAlerts are for administrators and the monitor groups; a snooze needs a reason and an end time in the future, at most 30 days away; a resolved alert cannot be snoozed, and an alert not snoozed cannot be unsnoozed
Inbound push
UNAUTHENTICATED.SIGNATURE_MISSING, SIGNATURE_INVALID, TIMESTAMP_OUT_OF_RANGE; UNAVAILABLE.SECRET_MISSING (503)A signed delivery with no signature, a wrong one, a timestamp outside toleranceSeconds, or a source whose secret is not set
INVALID_ARGUMENT.ROWS_INVALID (422), ROWS_EXPECTED, DELIVERY_ID_MISSING, BRANCH_NOT_ALLOWED; PERMISSION_DENIED.INBOUND_NOT_PERMITTED; PAYLOAD_TOO_LARGE.TOO_MANY_ROWS, DELIVERY_TOO_LARGEA row push with a row that does not fit the table (the row and column are named, and the batch is refused), a body that is not an array, a delivery id the source requires but did not send, a push to a branch, a caller not in the source's users or groups, or a push over its limit
Trained models
PERMISSION_DENIED.REVIEWER_ONLY; INVALID_ARGUMENT.BAD_REVIEW_STATUS, NOTE_REQUIRED, VERSION_REQUIRED; FAILED_PRECONDITION.NO_OUTCOMES, OUTCOME_COLUMNS (409)A review check signed off by someone outside its approvers, a fail without a note, live accuracy for a model with no outcomes or whose outcome table lacks its columns

Branching and retrying

Branch on code, then on reason where the fix differs, and read params for the values. Never match on title, detail or message. The generated SDK turns each code into an exception class and types params per reason, so a misspelt parameter name fails at compile time

In TypeScript

import { OntologyError } from "@marklandstreet/ontology-client";
import { placeHold } from "./ontology-types.ts";

export async function holdLot(batch: string, reason: string) {
  try {
    const res = await mso.actions(placeHold).run({ batch, reason }, { includeEdits: true });
    return { ok: true, logId: res.logId };
  } catch (err) {
    if (!(err instanceof OntologyError)) throw err;
    switch (err.code) {
      case "ACTION_VALIDATION_FAILED":
        // Show every failure beside its field, or as a banner for conditions; never retry
        const problems = err.errors.map((e) => ({
          field: e.parameter ?? e.condition,
          text: e.message,
        }));
        return { ok: false, problems };
      case "CONCURRENCY_CONFLICT":
        // Someone changed or decided it first: reload and show the person the new state
        return { ok: false, reload: batch };
      case "PERMISSION_DENIED":
        return { ok: false, denied: err.reason };
      default:
        // RATE_LIMITED, SERVICE_UNAVAILABLE and INTERNAL on reads were already retried
        // by the client; runs are sent once
        console.error(err.code, err.reason, err.requestId);
        throw err;
    }
  }
}

In the Python example below, the retry is safe because both calls carry the same idempotency key, so the hold can never land twice. Idempotency keys on applies and the idempotency_key argument are delivered on request; the rest of both examples, with the STALE_OBJECT and OBJECT_CHANGED reasons, runs against the clients today

A failed apply does not use up its key: only a committed result is stored against it, so the second call runs the action again. The function retries once and then hands the problem back, because a second OBJECT_CHANGED in a row means two writers are fighting over the same object and a person should hear about it

In Python

import logging, random, time
from datetime import date
from mso_client import OntologyError, ActionValidationFailed, ConcurrencyConflict
from ontology_types import PLACE_HOLD

log = logging.getLogger("holds")

def hold_lot(batch: str, reason: str):
    params = {"batch": batch, "reason": reason}
    key = f"hold-{batch}-{date.today().isoformat()}"
    try:
        return mso.actions(PLACE_HOLD).run(params, include_edits=True, idempotency_key=key)
    except ActionValidationFailed as err:
        for e in err.errors:
            field = e.get("parameter") or e.get("condition")
            log.warning("%s %s: %s", e["reason"], field, e["message"])
        return None
    except ConcurrencyConflict as err:
        if err.reason == "CONCURRENCY_CONFLICT.STALE_OBJECT":
            raise  # the caller reloads B-0841 and asks the person again
        time.sleep(1 + random.random())  # OBJECT_CHANGED: one late retry, same key
        return mso.actions(PLACE_HOLD).run(params, include_edits=True, idempotency_key=key)
    except OntologyError as err:
        if err.code == "MODEL_BUDGET_EXCEEDED":
            budget = err.params["budget"]
            log.info("model budget %s resets at %s", budget["id"], budget["resetsAt"])
            return None
        log.error("%s.%s request=%s", err.code, err.reason, err.request_id)
        raise

Retries and backoff

The SDK retries reads, loads and aggregations up to 3 times with exponential backoff and full jitter starting at 200 ms, and sends action applies once. On request, it retries applies with an idempotency key, which it generates when you do not pass one. If you write your own client, do the same

  1. Decide by code. Retry only RATE_LIMITED, INTERNAL, SERVICE_UNAVAILABLE, a refreshed UNAUTHENTICATED.TOKEN_EXPIRED, a WRITEBACK_FAILED with status 503, and one CONCURRENCY_CONFLICT.OBJECT_CHANGED. A CONFLICT.RUN_IN_PROGRESS clears when the running build finishes. Every other 4xx needs a changed request or a person
  2. Honour Retry-After. When the header is present it wins over your own delay. For MODEL_BUDGET_EXCEEDED it can be days, which is a reason to stop, not to sleep
  3. Back off with full jitter. Wait a random time between zero and min(cap, base × 2^attempt), with a base of 200 ms for reads and 1 s for applies and a cap of 30 s. Stop after 5 attempts for reads and 3 for applies
  4. Make writes safe to repeat. Send an Idempotency-Key on every state-changing POST, derived from what the request means. Keys are kept for 24 hours
  5. Retry in one layer only. A job that retries 3 times around an SDK call that retries 3 times sends 16 requests during an outage. Turn one of them off
  6. Keep a retry budget. Let retries add at most 10% to a client's traffic in any minute. Past that, fail fast and alert; the platform is telling you something a loop will not fix

Codes named on other pages

Some pages describe a failure by its reason alone. The table maps each to the code and reason the API returns

Name on another pageCode and reason returned
STALE_OBJECTCONCURRENCY_CONFLICT.STALE_OBJECT
REQUIRED_PROPERTYACTION_VALIDATION_FAILED.REQUIRED_PROPERTY on an action; a sync rejection reason in ops.sync_runs.rejections
NOT_UNDONEAn entry in errors of a WRITEBACK_FAILED or other run failure: a call made before the edits that has no undo
EDITS_NOT_CONVERTEDA blocking model change check, returned on merge as FAILED_PRECONDITION.MODEL_CHANGE_BLOCKED
MEMORY_LIMIT_EXCEEDEDMEMORY_LIMIT_EXCEEDED.MEMORY_LIMIT_EXCEEDED (507)
FUNCTION_READ_LIMITFUNCTION_READ_LIMIT.FUNCTION_READ_LIMIT (429)
INVALID_FILTERINVALID_ARGUMENT.INVALID_FILTER
DUPLICATE_PRIMARY_KEYOn request, SYNC_STALLED.DUPLICATE_PRIMARY_KEY. Built today, a key that appears twice in a full read is a DUPLICATE_KEY rejection in ops.sync_runs.rejections, and both rows' object is kept as it was
LATER_EDITCONCURRENCY_CONFLICT.REVERT_CONFLICT, a later change that blocks an undo

A few upper-case names are not error codes. They label a row or a delivery that the platform set aside while the request or job around it succeeded, and they never appear as a code

NameWhere it appearsMeans
REQUIRED_PROPERTY_NULL, VALUE_TYPE_CONSTRAINT, INVALID_GEOMETRYThe rule column of ops.rejected_rowsA source row failed validation and was kept out of the object store
RECIPIENT_LACKS_ACCESSops.notification_skips, beside the action log entryA notification recipient was skipped because they cannot see what it refers to

In the platform service, a sync counts the rows it rejected in ops.sync_runs.rows_rejected and lists the first 50 in rejections, each with its key and reason: KEY_MISSING, DUPLICATE_KEY, REQUIRED_PROPERTY or UNREADABLE. ops.rejected_rows with its rule column, and SEQUENCE_TIE are delivered on request; an edge agent's batch outside the allowed clock skew is refused with UNAUTHENTICATED.EDGE_CLOCK_SKEW

Related