Skip to content

DiagnosticCode

const DiagnosticCode: object

Defined in: libs/runtime/src/diagnostics.ts:50

Codes are stable identifiers a consumer can branch on; messages are for people.

readonly abstractType: "typedblite.abstract-type" = 'typedblite.abstract-type'

insert $x isa factory; when factory is abstract.

readonly abstractWithInstances: "typedblite.abstract-with-instances" = 'typedblite.abstract-with-instances'

person @abstract; when persons exist.

readonly alreadyDefined: "typedblite.already-defined" = 'typedblite.already-defined'

A redefine that restates what is applied — “already defined”.

readonly annotationArguments: "typedblite.annotation-arguments" = TypeQLiteValidationCode.annotationArguments

readonly annotationNotAdmitted: "typedblite.annotation-not-admitted" = TypeQLiteValidationCode.annotationNotAdmitted

readonly annotationNotEnforced: "typedblite.annotation-not-enforced" = TypeQLiteValidationCode.annotationNotEnforced

readonly constraintViolated: "typedblite.constraint-violated" = 'typedblite.constraint-violated'

readonly cyclicHierarchy: "typedblite.cyclic-hierarchy" = 'typedblite.cyclic-hierarchy'

readonly danglingRelation: "typedblite.dangling-relation" = 'typedblite.dangling-relation'

readonly dataDoesNotConform: "typedblite.data-does-not-conform" = 'typedblite.data-does-not-conform'

person owns barcode @key; when two products share a barcode — the data does not conform.

readonly duplicateLabel: "typedblite.duplicate-label" = TypeQLiteValidationCode.duplicateLabel

redefine entity x label y when y is taken — the validator’s own duplicate-label code, forwarded.

readonly emptyMatch: "typedblite.empty-match" = 'typedblite.empty-match'

readonly fetch: "typedblite.fetch" = 'typedblite.fetch'

A fetch the engine refuses before any row: a variable not available to it, a key mapped twice, an entity or relation fetched as a value, an attribute no owner can have, a scalar projection of an attribute that can be owned more than once, a sub-query with no fetch.

readonly functionArity: "typedblite.function-arity" = 'typedblite.function-arity'

A built-in called with the wrong number of arguments.

readonly given: "typedblite.given" = 'typedblite.given'

Given rows that do not fit the given stage — missing, undeclared, None, or of the wrong type.

readonly hasInstances: "typedblite.has-instances" = 'typedblite.has-instances'

undefine person while persons exist — “must be deleted”.

readonly hasSubtypes: "typedblite.has-subtypes" = 'typedblite.has-subtypes'

undefine person while child sub person exists.

readonly inheritedCapability: "typedblite.inherited-capability" = 'typedblite.inherited-capability'

undefine owns name from child when person owns name — inherited, “not allowed”.

readonly journalMode: "typedblite.journal-mode" = 'typedblite.journal-mode'

readonly keysRegistered: "typedblite.keys-registered" = 'typedblite.keys-registered'

readonly kindChanged: "typedblite.kind-changed" = 'typedblite.kind-changed'

entity name; over an attribute name — a label keeps its kind.

readonly mixedPattern: "typedblite.mixed-pattern" = 'typedblite.mixed-pattern'

$x sub person, has name $n — a variable used as a type and as a thing in one pattern.

readonly noCandidates: "typedblite.no-candidates" = 'typedblite.no-candidates'

readonly notDefined: "typedblite.not-defined" = 'typedblite.not-defined'

redefine person sub x on a parentless type; undefine @card from … where none is — “Try define instead” / “no defined”.

readonly nothingRedefined: "typedblite.nothing-redefined" = 'typedblite.nothing-redefined'

A redefine whose one statement changes nothing this engine records — “Nothing was redefined”.

readonly notImplemented: "typedblite.not-implemented" = 'typedblite.not-implemented'

A statement the grammar has and the engine does not — ADR-002 D7’s third layer, named.

readonly ownsNotAttribute: "typedblite.owns-not-attribute" = 'typedblite.owns-not-attribute'

house owns person; — only an attribute type is owned.

readonly parseFailed: "typedblite.parse-failed" = 'typedblite.parse-failed'

readonly projected: "typedblite.projected" = 'typedblite.projected'

readonly reducer: "typedblite.reducer" = 'typedblite.reducer'

A reducer the engine does not know, or one applied to the wrong kind of variable.

readonly relatesOnNonRelation: "typedblite.relates-on-non-relation" = 'typedblite.relates-on-non-relation'

person relates employee; on an entity.

readonly reservedKeyword: "typedblite.reserved-keyword" = TypeQLiteValidationCode.reservedKeyword

A reserved word where a label belongs — TypeDB’s [DEX31]; the validator’s code, forwarded.

readonly revisionNotDerived: "typedblite.revision-not-derived" = 'typedblite.revision-not-derived'

A revision from a peer that is not derived from its content, or a live one with no state: refused by ChangeLog.applyRemote (ADR-003, amendment of 2026-11-15).

readonly roleRedeclared: "typedblite.role-redeclared" = 'typedblite.role-redeclared'

fathership relates parent; when parentship relates parent is above it.

readonly schemaApplied: "typedblite.schema-applied" = 'typedblite.schema-applied'

readonly schemaChanged: "typedblite.schema-changed" = 'typedblite.schema-changed'

undefine/redefine applied — what changed, as a fact.

readonly supertypeChanged: "typedblite.supertype-changed" = 'typedblite.supertype-changed'

entity pigeon sub animal; when pigeon sub bird is applied — a parent changes by redefine only.

readonly supertypeKind: "typedblite.supertype-kind" = 'typedblite.supertype-kind'

entity contractor sub employment — a parent is of its child’s kind.

readonly tombstones: "typedblite.tombstones" = 'typedblite.tombstones'

readonly traitOnAttribute: "typedblite.trait-on-attribute" = 'typedblite.trait-on-attribute'

email owns name; — an attribute re-open carrying a trait. The attribute is known; the trait is the fault.

readonly truncated: "typedblite.diagnostics-truncated" = 'typedblite.diagnostics-truncated'

readonly unboundValue: "typedblite.unbound-value" = 'typedblite.unbound-value'

A value expression reads a variable nothing binds.

readonly unknownAttribute: "typedblite.unknown-attribute" = 'typedblite.unknown-attribute'

readonly unknownFunction: "typedblite.unknown-function" = 'typedblite.unknown-function'

A function the engine does not know.

readonly unknownRole: "typedblite.unknown-role" = 'typedblite.unknown-role'

plays employment:ceo — no such role declared by that relation (an inherited one counts as its declarer’s).

readonly unknownType: "typedblite.unknown-type" = 'typedblite.unknown-type'

readonly unownedAttribute: "typedblite.unowned-attribute" = 'typedblite.unowned-attribute'

readonly unprojectableVariable: "typedblite.unprojectable-variable" = TypeQLiteValidationCode.unprojectableVariable

readonly unsupportedIncrementalRole: "typedblite.unsupported-incremental-role" = 'typedblite.unsupported-incremental-role'

insert $l links (source: $b); against an already-matched relation — see runInsert.

readonly valueAssignedTwice: "typedblite.value-assigned-twice" = 'typedblite.value-assigned-twice'

A let variable assigned twice in one branch.

readonly valueCycle: "typedblite.value-cycle" = 'typedblite.value-cycle'

lets that wait on each other and can never be evaluated.

readonly valueOutOfRange: "typedblite.value-out-of-range" = 'typedblite.value-out-of-range'

An arithmetic result outside its type — a 64-bit integer overflow, a division by zero.

readonly valueTypeConflict: "typedblite.value-type-conflict" = 'typedblite.value-type-conflict'

code-name sub name, value integer under a string name — a subtype’s value type is its parent’s.

readonly valueTypeOnThing: "typedblite.value-type-on-thing" = TypeQLiteValidationCode.valueTypeOnThing

readonly writeInRead: "typedblite.write-in-read" = 'typedblite.write-in-read'

A write stage handed to query(), which reads — execute() runs writes.

readonly wrote: "typedblite.wrote" = 'typedblite.wrote'

TypeDBLite is an independent open-source project, built on TypeDB with thanks. It is not affiliated with, sponsored by, or endorsed by TypeDB Ltd. Released under the MPL-2.0 license.