Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error Codes

Every failure is a CodedError with a typed Code, a message, and optional structured Details (often a path naming the offending instance or connection). Resolution is fail-fast: the first error stops the run and is returned. With the global --json flag, the error is emitted as a {code, message, details} JSON envelope on stderr.

Codes are grouped by domain.

RESOLVE_* — document resolution

CodeMeaning
RESOLVE_INVALIDInvalid invocation (e.g. missing document path argument).
RESOLVE_IOI/O failure loading the document.
RESOLVE_INTERNALUnexpected internal error.
RESOLVE_DOCUMENT_INVALIDThe document failed Pass 1 (structural validation) or is not valid JSON.
RESOLVE_CONFIG_INVALIDAn instance’s interpolated config failed item-type schema validation.
RESOLVE_CHILDREN_NOT_ALLOWEDChildren declared on a non-container item type.

SCHEMA_* — catalog & reference resolution

CodeMeaning
SCHEMA_NOT_FOUNDA referenced schema could not be located.
SCHEMA_IOI/O failure reading a schema or document.
SCHEMA_INVALIDA schema failed to parse / is malformed.
SCHEMA_REFA $ref could not be resolved.
SCHEMA_VALIDATIONA document failed JSON Schema validation.
SCHEMA_REF_UNRESOLVEDAn instance $ref matched no catalog schema, relative file, or inline fragment.
SCHEMA_VERSION_MISMATCHA $ref named a type whose pinned semver is missing/mismatched in the catalog.

VAR_* — variables

CodeMeaning
VAR_UNDEFINEDA $var / ${} reference named an undeclared or unset variable.
VAR_TYPEA variable value (default, computed result, or override) did not match its declared type.
VAR_EXPRA computed-variable expression failed to compile or evaluate.
VAR_DECLARATION_INVALIDMalformed declaration: missing name, unknown type, both default and expr, or a duplicate name in one scope.
VAR_OPTIONS_INVALIDEnum options missing/malformed, options on a non-enum, or a value outside the enum set.
VAR_CYCLEComputed variables form a dependency cycle.

CONNECTION_*, SECRET_*, BINDING_*, CONTRACT_* — data

CodeMeaning
CONNECTION_NOT_FOUNDA referenced connection was not declared.
CONNECTION_INVALIDA connection declaration is malformed (e.g. missing $ref).
CONNECTION_DUPLICATE_IDTwo connections share an id.
CONNECTION_TYPE_UNRESOLVEDA connection’s $ref matched no connection-type schema.
CONNECTION_CONFIG_INVALIDA connection’s config failed its connection-type schema.
SECRET_INVALIDA { "$secret": "name" } reference has an empty or non-string name.
SECRET_MISSINGA referenced secret is not set in the environment.
BINDING_INVALIDA query without a connectionId, or a malformed connectionId/query.
BINDING_CONNECTION_NOT_FOUNDAn item’s connectionId matched no declared connection.
CONTRACT_MISSINGA bound item’s type declares no expectedResult contract.
CONTRACT_INVALIDA bound item type’s expectedResult is not a well-formed schema fragment.
RESULT_SHAPE_INVALIDA static connection’s inline data violates the consuming item’s contract.

LAYOUT_* — container grids

CodeMeaning
LAYOUT_PLACEMENT_INVALIDA child placement carried a non-positive span or start.
LAYOUT_PLACEMENT_OUT_OF_BOUNDSA child placement extends beyond the parent grid bounds.
LAYOUT_FORM_COLUMNS_INVALIDA form’s flow-layout column count is out of range.
LAYOUT_FORM_CHILD_INVALIDA form holds a child that is not a variable widget.

CONFIGURABLE_*, CONFIG_OVERRIDE_* — surfaces & overrides

See Configurable Surfaces and Runtime Overrides.

CodeMeaning
CONFIGURABLE_SURFACE_INVALIDAn item type’s configurable declaration is malformed: it names a non-existent config field, gives a field an unknown value type, or sets a rendering hint naming a widget the catalog does not know.
CONFIG_OVERRIDE_FIELD_UNKNOWNA <node-id>.<field> config override addressed a field not on the target’s configurable surface (or a dotted sub-path).
CONFIG_OVERRIDE_VALUE_INVALIDA config-override value violates the target surface field’s declared type or the item type’s config-schema constraints.

WRAPPER_* — the block wrapper

See Blocks & the Tree Grammar.

CodeMeaning
WRAPPER_ID_MISSINGA block wrapper is missing its required stable id (absent or whitespace-only).
WRAPPER_CHILD_COUNT_INVALIDA block wrapper does not wrap exactly one inner content item (content absent, null, or not a single instance object).

GRAMMAR_* — the dashboard tree grammar

See Blocks & the Tree Grammar.

CodeMeaning
GRAMMAR_ROOT_CHILD_INVALIDA node directly under root is not a positional region (the only legal root children are positional-marked types, e.g. container, variable-box).
GRAMMAR_REGION_CHILD_INVALIDA container region holds an illegal child — a bare (unwrapped) content leaf, which must be block-wrapped.
GRAMMAR_VARIABLE_BOX_CHILD_INVALIDA variable-box holds a child that is not a variable widget held directly.
GRAMMAR_WRAPPER_NESTEDA block wrapper’s single inner content is itself a block wrapper — wrappers do not recurse.
GRAMMAR_REGION_THEME_FORBIDDENA positional region carries a theme — regions are layout-only; only block wrappers carry chrome.

CONFIGURATOR_* — configurators

See Configurators.

CodeMeaning
CONFIGURATOR_TARGET_NOT_FOUNDA configurator’s target named an item id that no node in the tree declares.
CONFIGURATOR_TARGET_MISSING_IDA configurator’s target is empty/whitespace-only, so it names no resolvable id.
CONFIGURATOR_TARGET_SCOPE_UNKNOWNA configurator’s target is a $-prefixed keyword naming no known document scope (the recognized scopes are $manifest, $variables, $connections, $theme, $root).

CHANGESET_*, PATCH_* — the JSON Patch write pipeline

See Changesets (JSON Patch). A field-edit guardrail violation reuses the CONFIG_OVERRIDE_* codes (the changeset and runtime-override guardrails share the configurable surface); an unknown $-scope in a changeset pointer reuses CONFIGURATOR_TARGET_SCOPE_UNKNOWN. The codes below are specific to applying a changeset.

CodeMeaning
CHANGESET_INVALIDA changeset document is malformed: not a JSON array of operation objects, or an operation has a missing/wrong-typed required member (a non-string/absent op or path, an unknown op, a value-requiring op without value, or a from-requiring op without from).
CHANGESET_POINTER_INVALIDAn id-rooted changeset pointer is not well-formed for translation: empty, not rooted at /, or with an empty leading id/scope segment.
CHANGESET_TARGET_NOT_FOUNDA changeset pointer’s leading segment names an item id that no node in the document declares, so there is nothing to address. (An unknown $-scope reuses CONFIGURATOR_TARGET_SCOPE_UNKNOWN.)
CHANGESET_STRUCTURAL_ID_INVALIDA structural add op inserting an item into a children array does not carry a valid, document-unique id: the value is not an object, its id is missing/blank/non-string, or it collides with an id already in the document. (Re-resolve cannot catch this — the resolver’s id index is last-wins.)
CHANGESET_REVISION_CONFLICTThe optimistic-concurrency precondition failed: an expected revision was supplied, but the store’s current revision — re-read immediately before write — no longer matches, so the document changed since it was loaded. Distinct so callers can reload and retry; nothing is persisted.
CHANGESET_REVISION_UNSUPPORTEDAn expected revision was supplied but the configured store does not implement the RevisionedStore capability, so the precondition cannot be enforced. (Both the fs and git backends implement it; this guards a custom/stub store.)
PATCH_APPLY_FAILEDA translated changeset could not be applied by the RFC 6902 applier: the patch did not decode, or an operation failed at apply time (a test precondition mismatch, a remove/replace of a missing member, or an out-of-range array index). The whole changeset is rejected.
PATCH_INVALIDAn invalid lattice patch invocation: a missing manifest id argument, a missing/unreadable --changeset file, or a stdin read failure.

SERVE_* — the HTTP layer

CodeMeaning
SERVE_INVALIDInvalid serve invocation (missing document, out-of-range port).
SERVE_RESOLVEThe served document failed to resolve (wraps the underlying resolver error; rendered on the HTML error page).
SERVE_INTERNALUnexpected error in the web layer.

STORAGE_* — whole-document persistence

See Storage Backends.

CodeMeaning
STORAGE_ID_INVALIDA document’s manifest.id is not usable as a filename-safe addressing key: absent, empty/whitespace-only, containing a path separator, or a relative path element (., ..).
STORAGE_NOT_FOUNDA Load/Delete/History/LoadAt addressed an id (or revision) that no stored document/commit matches.
STORAGE_IOAn I/O failure reading or writing a document (open, write, rename, stat, remove), or a git operation failure (including the empty/no-op commit rejected when re-saving byte-identical content).
STORAGE_INVALIDA document could not be parsed far enough during Save to extract its manifest.id (malformed JSON or a missing manifest object).
STORAGE_INTERNALAn unexpected error in a storage backend.
STORAGE_BACKEND_UNKNOWNThe --store value names no known backend (the recognized kinds are fs and git).