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
CODE.REASON where the fix differs between variants, else nullIn the platform today
- The platform service returns every error of its own as problem details in the shape below:
type,title,status,code,reasonwrittenCODE.REASON(or null),detail,params,errors,retryableandrequestId - The request id is on the
X-Request-Idheader, andtraceparentis 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
422with{"detail": [ … ]}, and an unknown path a404with{"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_ROUTEandMODEL_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 typeNOT_FOUND.TYPE_NOT_FOUND, a missing action typeNOT_FOUND.ACTION_TYPE_NOT_FOUND, too many hopsINVALID_ARGUMENT.TOO_MANY_HOPS, an action over 10,000 editsACTION_VALIDATION_FAILED.EDIT_LIMIT_EXCEEDED, an edit that leaves a required property emptyACTION_VALIDATION_FAILED.REQUIRED_PROPERTY, a form's stale objectCONCURRENCY_CONFLICT.STALE_OBJECTand an object that kept changing through automatic retriesCONCURRENCY_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
- The other codes and reasons on this page, the
Retry-Afterheader, and thetemplate,instanceandtraceIdfields
General codes
Codes the platform service returns across many features, with examples of what returns each
| Code | Status | Returned for |
|---|---|---|
NOT_FOUND | 404 | An 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_PRECONDITION | 409 | The 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_EXISTS | 409 | An edge agent, pipeline or grant that is already there |
CONFLICT | 409 | A folder already loading, a draft that changed since it was opened, a pipeline already building (RUN_IN_PROGRESS), an alert already resolved |
ABORTED | 409 | An agent team member stopped by the team's limit |
UNAVAILABLE | 503 | A 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_EXHAUSTED | 429 | A model provider's rate limit |
DEADLINE_EXCEEDED | 408 | A pipeline preview or SQL workspace query that ran past its time |
MEMORY_LIMIT_EXCEEDED | 507 | A TypeScript function past its heap limit |
FUNCTION_READ_LIMIT | 429 | A TypeScript function past its reads per call |
DATA_LOSS | 500 | A sealed value that does not open with its key (SEALED_VALUE_INVALID) |
AGENT_FAILED | 502 | An agent started by an automation that failed (AGENT_RUN_FAILED) |
MODEL_STEP_FAILED | 502 | An AI function's model step that failed with no fallback step (NO_FALLBACK) |
MODEL_OUTPUT_INVALID | 502 | Document 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 status | In short | Retry |
|---|---|---|
INVALID_ARGUMENT400 | The request is malformed or names something that is not there | No |
UNAUTHENTICATED401 | No valid token | After refreshing the token |
PERMISSION_DENIED403 | Missing role, scope or access label | No |
IDEMPOTENCY_KEY_REUSED409 | Same key, different body | No |
PAYLOAD_TOO_LARGE413 | A file, row push or delivery over its limit | No |
RATE_LIMITED429 | A stream, webhook, model capacity or retention run limit was reached | Yes, with backoff |
INTERNAL500 | An unexpected platform error | Yes, with backoff |
SERVICE_UNAVAILABLE503 | A dependency is briefly unavailable | Yes, with backoff |
OBJECT_TYPE_NOT_FOUND404 | No such type, or not visible | No |
OBJECT_NOT_FOUND404 | No such object, or not visible | No |
PAGE_TOKEN_EXPIRED410 | Page token older than its lifetime | Restart from the first page |
CHANGE_CURSOR_EXPIRED410 | Change feed cursor older than the type's version history | After resyncing from a snapshot |
ONTOLOGY_REVISION_INCOMPATIBLE412 | The client was built against an older revision | After regenerating the client |
QUERY_TOO_COMPLEX422 | A query over the query service's limits | No |
ACTION_TYPE_NOT_FOUND404 | No such action type, or not visible | No |
ACTION_VALIDATION_FAILED422 | Parameters or action conditions failed | No |
CONCURRENCY_CONFLICT409 | An object moved under the action | After re-reading |
EDIT_LIMIT_EXCEEDED422 | Too many edits, objects or parameter sets | No |
ACCESS_NOT_REQUESTABLE422 | An item or prerequisite cannot be requested | No |
ACCESS_ALREADY_HELD409 | The caller already holds every item | No |
ACCESS_REQUEST_DUPLICATE409 | A pending request for the same items exists | No |
CERTIFICATION_CHECKS_FAILED422 | A certification check failed | After fixing the checks |
DEPRECATION_SCHEDULE_TOO_SHORT422 | Removal comes too soon after the deprecation | No |
TAG_RULE_FAILED422 | A tag value needs an access label the resource does not carry | No |
FUNCTION_TIMEOUT504 | A function ran past its timeout | No |
FUNCTION_FAILED500 | A function threw or ran out of memory | No |
FUNCTION_VERSION_RETIRED410 | The requested function version is retired | After changing the pinned version |
NO_ELIGIBLE_ROUTE422 | No model route is cleared for the data in the call | No |
MODEL_BUDGET_EXCEEDED429 | A model budget is used up | Not before the budget resets |
AGENT_LIMIT_REACHEDRun outcome | An agent run hit its step, time, token, cost or proposal limit | No |
BUILD_BLOCKEDBuild outcome | A blocking check failed | On the next build, after a fix |
SYNC_STALLEDSync state | A connector or sync job stopped advancing | Resumes by itself once fixed |
WRITEBACK_FAILED422, 502 or 503 before the edits; writeback outcome after | A system of record did not accept the call or the edits | 503 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
| Field | Type | Description |
|---|---|---|
type | URI | The 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 |
title | String | A short summary of the code for people. Wording may change. For example "Action validation failed" |
status | Integer | The HTTP status, repeated in the body for clients that lose headers. For example 422 |
code | String | The stable code. Branch on this first. For example "ACTION_VALIDATION_FAILED" |
reason | String or null | The 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" |
detail | String | The 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" |
template | String | On 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}" |
params | Object | The named values behind the message. Names are fixed per reason; values are typed (numbers, timestamps, keys). For example { "failed": 2 } |
retryable | Boolean | Whether the same request could succeed unchanged later. A hint that agrees with the tables below. For example false |
instance | String | On request: the path that failed, such as "/api/v2/actions/place-hold:run" |
requestId | String | Quote it to support. It is also on the X-Request-Id header and in the audit entry. For example "req_01M5Y20VY0Y6DNWWNGJJM85G2W" |
traceId | String | On request: the W3C trace id, the same one returned on traceparent, such as "4bf92f35…" |
errors | Array | Present 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
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
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
| Reason | Params | Cause | Fix |
|---|---|---|---|
INVALID_FILTER | path, operator, propertyType | An operator that does not apply to the property, such as $lt on a string or $near on a number | Use an operator for that base type, listed on object sets |
UNAUTHENTICATED
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(paramexpiredAt),TOKEN_INVALID,UNKNOWN_PRINCIPALfor a signed-in person who is not a user of the ontology,USER_DEACTIVATEDfor someone the directory turned off,TOKEN_REVOKEDfor a token issued before their cut-off,SCIM_CLIENT_UNKNOWNon/scim/v2, andSTREAM_TICKET_INVALID - Signed inbound deliveries:
SIGNATURE_MISSING,SIGNATURE_INVALIDorTIMESTAMP_OUT_OF_RANGE - Edge agents:
EDGE_SIGNATURE_MISSING,EDGE_SIGNATURE_INVALID,EDGE_CLOCK_SKEW,EDGE_CERT_MISMATCHorEDGE_REPLAYED
| Reason | Params | Cause | Fix |
|---|---|---|---|
TOKEN_MISSING | None | No Authorization header | Send Bearer <access token> on every call |
TOKEN_EXPIRED | expiredAt | Access tokens last 60 minutes | Refresh and retry once. The clients call your token function before every request |
TOKEN_INVALID | None | A bad signature, a token for another tenant or a revoked token | Request a new token from this tenant's token endpoint |
USER_DEACTIVATED | None | An administrator, the identity provider over SCIM or the inactivity timer turned the person off. Refused from the next request | Do not retry; an administrator reactivates the person if that was a mistake |
TOKEN_REVOKED | None | With sign-on, a token issued before the person's cut-off, still refused after they are reactivated | Sign in again for a new token |
PERMISSION_DENIED
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_REQUIREDandREVERT_NOT_PERMITTED- For agents:
TOOL_NOT_ALLOWEDandAGENT_NOT_ALLOWED - For the operational tables and SQL:
OPS_GRANT_REQUIREDandTABLE_GRANT_REQUIRED NOT_OWNER,NOT_EDITOR,SELF_APPROVAL,NOT_APPROVER,CERTIFIER_ONLY,TAG_SETTER_ONLYandTENANT_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_ONLYandROLLBACK_NOT_ALLOWED
On request, reasons that name a missing role, scope or access label, with a link to request it
IDEMPOTENCY_KEY_REUSED
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
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
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
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
The platform service returns these reasons
DEPENDENCY_UNAVAILABLE: the identity provider did not answerAUDIT_CONTENDED: the audit log was busy; retryableDIRECTORY_CONTENDED: another copy was writing the directory; retryableCOMMIT_BUSY: the service was busy committing another change; retryable, nothing was committedSHUTTING_DOWN: the copy is stopping; retryableTENANT_KEY_UNAVAILABLEPROVIDER_ERRORandPROVIDER_UNREACHABLEfrom a model provider
A dependency that is not ready, such as the branch store or an embedding model still loading, is UNAVAILABLE
| Reason | Params | Cause | Fix |
|---|---|---|---|
DEPENDENCY_UNAVAILABLE | service | A platform service is restarting or failing over, typically for seconds | Retry with backoff and jitter |
Object and query codes
OBJECT_TYPE_NOT_FOUND
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
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
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
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
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
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
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
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_FAILEDorPARAMETER_INVALID, and each entry inerrorshasPARAMETER_MISSING,PARAMETER_INVALID,PARAMETER_UNKNOWNorCONDITION_FAILED - An entry for a value type also carries
valueTypeandconstraint, and one for an interface parameterobjectReason - The edits an action computes can fail as
VALUE_TYPE_CONSTRAINT,REQUIRED_PROPERTY,UNKNOWN_PROPERTYorEDIT_LIMIT_EXCEEDED, and the files an edit puts on an object asFILE_INVALID,FILE_NOT_ATTACHABLE,FILE_TYPE_NOT_ACCEPTEDorFILE_ATTACH_LIMIT, each entry inerrorsnaming theobjectType,primaryKeyandproperty - An action whose allowed groups leave the caller out returns
PERMISSION_DENIED.ACTION_NOT_PERMITTEDinstead - A TypeScript function that throws
FunctionErrorreturnsFUNCTION_FAILED.USER_FACING_ERROR(422) with its message
| Reason | Params | Cause | Fix |
|---|---|---|---|
PARAMETER_MISSING | parameter | A required parameter was not sent | Send it; GET /actions/{action} lists which are required |
PARAMETER_INVALID | parameter, constraint, plus min, max, options or pattern | A 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_FAILED | condition, plus the condition's own template parameters | An action condition evaluated to false, for example notHeld | Show the message. The state of the world has to change, or a person who meets the condition has to act |
REQUIRED_PROPERTY | objectType, primaryKey, property, one entry per empty property | A 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 committed | Set the value in the rule or the form, or make the parameter that feeds it required |
FUNCTION_REJECTED | function, version | On request. A function that computes the edits rejected the input with a message meant for the person | Show the message as written; it comes from the function's author |
CONCURRENCY_CONFLICT
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_DECIDEDandPROPOSAL_EXPIRED - On an undo:
ALREADY_REVERTED,IS_A_REVERT,REVERT_CONFLICTandTYPE_REMOVED - For a create on a key that exists:
ALREADY_EXISTS - On a dashboard or app saved from an older version:
STALE_VERSIONandSTALE_REVISION - Also
BRANCH_CONFLICT,BRANCH_EXISTS,MODEL_CHANGE_CONFLICT,AUTOMATION_EXPIREDandDEFINED_IN_ONTOLOGY - On an apply:
STALE_OBJECTandOBJECT_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)
| Reason | Params | Cause | Fix |
|---|---|---|---|
STALE_OBJECT | In errors: objectType, objectKey, expectedVersion, version | The 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 saw | Reload the object, show the person what changed and let them apply again |
OBJECT_CHANGED | In errors: objectType, objectKey, expectedVersion, version | An 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 to | Retry once after 1 to 2 s with jitter. If it recurs, serialize the writers, for example one automation per delivery |
PROPOSAL_DECIDED | None | Someone else approved or rejected the proposal first. It ran once, as the first decision | Read the proposal again to see who decided and what ran |
EDIT_LIMIT_EXCEEDED
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_GRANTEDfor something the caller already has,PERMISSION_DENIED.ACCESS_LABEL_NOT_REQUESTABLEorGROUP_NOT_REQUESTABLEfor an item that can't be requested,PERMISSION_DENIED.SELF_APPROVAL,NOT_APPROVERandREQUESTER_ONLY, andFAILED_PRECONDITION.REQUEST_CLOSEDandGRANT_ENDED - Certification returns
PERMISSION_DENIED.CERTIFIER_ONLYandINVALID_ARGUMENT.MISSING_REASON,INVALID_SCHEDULEorINVALID_REPLACEMENT, and a new use of a deprecated itemFAILED_PRECONDITION.DEPRECATED_NO_NEW_USES - Tags return
INVALID_ARGUMENT.TAG_VALUE_NOT_ALLOWEDandPERMISSION_DENIED.TAG_SETTER_ONLY
The codes in this section are delivered on request
ACCESS_NOT_REQUESTABLE
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
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
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
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
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
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
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
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)
| Reason | Params | Cause | Fix |
|---|---|---|---|
UNCAUGHT_EXCEPTION | function | The function threw | Fix the function, or throw a FunctionError so the call returns FUNCTION_FAILED.USER_FACING_ERROR with a useful message |
INVALID_EDIT_SEQUENCE | None | An edit function returned an edit that is not a modify, create or delete with a type and key | Fix the function |
FUNCTION_VERSION_RETIRED
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
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
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
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_BLOCKEDas an HTTP409, with reasons such asEXPECTATION_FAILED,INPUT_MISSING,SQL_FAILED,SQL_NOT_ALLOWED,DEPENDENCY_CYCLEandENGINE_UNAVAILABLE, and a failed build is apipeline.build.failedevent fromops.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_runsnames thefailed_step - Schema contracts add
INPUT_CONTRACTandOUTPUT_CONTRACT, and a quarantine replay that no longer fits its stepREPLAY_INVALID - A second build of a pipeline already building waits briefly, then gets
CONFLICT.RUN_IN_PROGRESS(409) - A failed sync is a
sync.failedevent, and the source rows a sync refuses are counted inops.sync_runs.rows_rejectedand listed, the first 50, in itsrejectionscolumn with key and reason:KEY_MISSING,DUPLICATE_KEY,REQUIRED_PROPERTYorUNREADABLE - A writeback row that fails 5 attempts, or that a real system refused outright, moves to
dead_letterinops.writeback_outboxwith itslast_error, and sendswriteback.failed WRITEBACK_FAILEDis 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
| Reason | Params | Cause | Fix |
|---|---|---|---|
EXPECTATION_FAILED | dataset, build, expectation, observed | A blocking check failed. The dataset and its objects stay on the last good version, marked stale | Fix the source or the step. An Owner on the pipeline can override one build with a written reason |
INPUT_CONTRACT, OUTPUT_CONTRACT | dataset, contract, violations | An input or output schema no longer matches the one its schema contract holds, under the mode exact, exactAnyOrder, additions or additionsKept | Fix the source or the step, or accept the new schema with POST /api/v2/schema-contracts:accept |
UPSTREAM_HELD | dataset, upstream | On 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 log | Fix the upstream build; held pipelines run in dependency order once it passes |
SYNC_STALLED
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
| Reason | Params | Cause | Fix |
|---|---|---|---|
SOURCE_UNREACHABLE | connector, since | The source or the edge agent in front of it cannot be reached | Check the edge agent and the source's credentials |
SOURCE_LOG_TRUNCATED | connector, table, position | The change data capture position is no longer in the source's log, usually after a long outage or a log cleanup | Take a new snapshot of the table from the connector |
DUPLICATE_PRIMARY_KEY | objectType, datasetVersion, keys | One dataset version holds two rows for one key | Fix the pipeline's key logic; the job resumes on the next commit |
WRITEBACK_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: truewhen it was unavailable or too slow (SYSTEM_UNAVAILABLE,SYSTEM_UNREACHABLE,CALL_TIMEOUTorRATE_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
| Reason | Extra params | Cause | Fix |
|---|---|---|---|
TARGET_REJECTED | targetStatus, targetMessage | The target answered 400, 422 or a business rule refusal. Dead-lettered at once | Fix the cause in the target, then retry; or revert the action |
TARGET_CONFLICT | targetReference | The target record changed since the Ontology last read it | Retry after source refresh, which re-runs the conflict check |
RETRIES_EXHAUSTED | attempts, firstAttemptAt | Transient failures for 5 attempts in the platform service; on request, for 72 hours from the first attempt | Fix 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 reasons | Means |
|---|---|
| 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_FAILED | A 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_MISSING | An 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_SCANNED | A 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_ACCESS | An 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_FOUND | Only 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_BEFORE | Notification 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_PERMITTED | A 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_REQUIRED | Only 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_FOUND | A 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_REQUIRED | Only 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_FOUND | A 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_INSTALLED | An 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_UNTRUSTED | An 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_FOUND | Editing 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_FOUND | Answering 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_FOUND | Too 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_FOUND | Only 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_FAILED | A 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_REQUIRED | A 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_SNOOZED | Alerts 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_LARGE | A 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
- Decide by code. Retry only
RATE_LIMITED,INTERNAL,SERVICE_UNAVAILABLE, a refreshedUNAUTHENTICATED.TOKEN_EXPIRED, aWRITEBACK_FAILEDwith status 503, and oneCONCURRENCY_CONFLICT.OBJECT_CHANGED. ACONFLICT.RUN_IN_PROGRESSclears when the running build finishes. Every other 4xx needs a changed request or a person - Honour Retry-After. When the header is present it wins over your own delay. For
MODEL_BUDGET_EXCEEDEDit can be days, which is a reason to stop, not to sleep - 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 - Make writes safe to repeat. Send an
Idempotency-Keyon every state-changingPOST, derived from what the request means. Keys are kept for 24 hours - 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
- 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 page | Code and reason returned |
|---|---|
STALE_OBJECT | CONCURRENCY_CONFLICT.STALE_OBJECT |
REQUIRED_PROPERTY | ACTION_VALIDATION_FAILED.REQUIRED_PROPERTY on an action; a sync rejection reason in ops.sync_runs.rejections |
NOT_UNDONE | An entry in errors of a WRITEBACK_FAILED or other run failure: a call made before the edits that has no undo |
EDITS_NOT_CONVERTED | A blocking model change check, returned on merge as FAILED_PRECONDITION.MODEL_CHANGE_BLOCKED |
MEMORY_LIMIT_EXCEEDED | MEMORY_LIMIT_EXCEEDED.MEMORY_LIMIT_EXCEEDED (507) |
FUNCTION_READ_LIMIT | FUNCTION_READ_LIMIT.FUNCTION_READ_LIMIT (429) |
INVALID_FILTER | INVALID_ARGUMENT.INVALID_FILTER |
DUPLICATE_PRIMARY_KEY | On 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_EDIT | CONCURRENCY_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
| Name | Where it appears | Means |
|---|---|---|
REQUIRED_PROPERTY_NULL, VALUE_TYPE_CONSTRAINT, INVALID_GEOMETRY | The rule column of ops.rejected_rows | A source row failed validation and was kept out of the object store |
RECIPIENT_LACKS_ACCESS | ops.notification_skips, beside the action log entry | A 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