diagnostic-codes
title: Diagnostic Codes sidebar_position: 2
Diagnostic code catalog
Every diagnostic rule-line reports carries a stable code. The code is the contract: integrations branch on it and tests assert on it, never on the message text. Message text is display copy and may change — including being translated at authoring time (AI-14) — while the code stays fixed.
Some codes are reserved: registered now so the contract is stable, but not yet emitted by any producer. Each is marked with the phase that will first emit it, so a code with no current thrower is not mistaken for a missing feature.
This page is generated from DIAGNOSTIC_CODES, imported through the engine's
published @one-unity/rule-line-engine/analysis subpath — adding a code
without regenerating this page fails docs:check.
| Code | Description | Status |
|---|---|---|
DSL_INVALID_DOCUMENT | The submitted ruleset document is not a valid object and cannot be read at all. | Emitted in Phase 1 |
DSL_UNKNOWN_STEP_TYPE | A step in this ruleset uses a type that this version of rule-line does not recognize. | Emitted in Phase 1 |
DSL_MISSING_REQUIRED_FIELD | A field that this ruleset requires is missing from the document. | Emitted in Phase 1 |
DSL_INVALID_TYPE | A field in this ruleset has a value of the wrong kind, such as text where a number was expected. | Emitted in Phase 1 |
DSL_UNSUPPORTED_SCHEMA_VERSION | This ruleset declares a schema version that this version of rule-line does not support. | Emitted in Phase 1 |
DSL_DUPLICATE_STEP_SLUG | Two steps in this ruleset share the same identifying name, which must be unique. | Emitted in Phase 1 |
DSL_INVALID_STEP_SLUG | A step's identifying name does not match the naming pattern this ruleset requires. | Emitted in Phase 1 |
DSL_EMPTY_STEP_LIST | This ruleset does not declare any steps, but at least one step is required to run it. | Emitted in Phase 1 |
ENV_LIMIT_EXCEEDED | A run of this ruleset used more of a declared resource than its envelope allows (Phase 5, ENG-15). | Reserved — first emitted in Phase 5 (ENG-15) |
ENV_DECLARED_EXCEEDS_PLATFORM_MAXIMUM | This ruleset declares a resource limit higher than the platform allows for any tenant (Phase 3, ENG-14). | Reserved — first emitted in Phase 3 (ENG-14) |
ENV_FIELD_INHERITS_MAXIMUM | This ruleset does not declare its own limit for a resource, so the platform's maximum applies instead (Phase 3). | Reserved — first emitted in Phase 3 |
AI_SPEND_CAP_EXCEEDED | This run was stopped because it would have spent more on AI calls than the tenant's cap allows (API-03). | Reserved — first emitted in Phase 5 (API-03) |
EXPR_UNKNOWN_FUNCTION | A formula in this ruleset calls a function name that does not exist in rule-line's function library (Phase 2). | Emitted in Phase 2 |
EXPR_SYNTAX_ERROR | This formula could not be read as valid expression syntax. | Emitted in Phase 2 |
EXPR_WRONG_ARITY | A function in this formula was called with the wrong number of arguments. | Emitted in Phase 2 |
EXPR_TYPE_MISMATCH | A value in this formula is not the kind of value an operator or function expects at that position. | Emitted in Phase 2 |
EXPR_DIVISION_BY_ZERO | This formula divides by zero, which has no defined result. | Emitted in Phase 2 |
EXPR_UNDEFINED_ARITHMETIC | This formula performs arithmetic on a value that is missing or null, which has no defined result. | Emitted in Phase 2 |
EXPR_INVALID_ROUNDING_MODE | This formula names a rounding mode that rule-line does not recognize. | Emitted in Phase 2 |
EXPR_CONTEXT_NOT_REPRESENTABLE | A value supplied as data for this run cannot be represented by the engine and was refused rather than guessed at. | Emitted in Phase 2 |
ENGINE_INTERNAL_ERROR | An unexpected fault occurred inside the engine itself. This is not feedback about your ruleset or formula. | Emitted in Phase 2 |
PATH_SYNTAX_ERROR | A data-access path in this formula could not be read as valid syntax. | Emitted in Phase 2 |
PATH_ABSENT | A data-access path in this formula did not resolve to a value for the given data. | Emitted in Phase 2 |
EXPR_NULL_IN_ARITHMETIC | This formula performs arithmetic on a value that is explicitly null, which has no defined result. | Emitted in Phase 2 |
EXPR_IMPLICIT_CONVERSION_REJECTED | This formula would need to silently convert text into a number, which rule-line never does automatically. Use an explicit conversion function instead. | Emitted in Phase 2 |
EXPR_PLUS_ON_NON_NUMBER | The '+' operator only adds numbers in rule-line. To join text together, use CONCAT instead. | Emitted in Phase 2 |
EXPR_INCOMPARABLE_ORDERING | This formula orders two values of kinds that cannot be meaningfully compared to each other. | Emitted in Phase 2 |
EXPR_CONDITION_NOT_BOOLEAN | A condition in this ruleset must evaluate to true or false, but this one evaluates to a different kind of value. | Emitted in Phase 2 |
EXPR_NUMBER_PARSE_FAILED | This text could not be read as a number in the format that was specified. | Emitted in Phase 2 |
EXPR_COMPLEXITY_LIMIT_EXCEEDED | This formula is more deeply nested, or longer, than rule-line allows. | Emitted in Phase 2 |
EXPR_EMPTY_AGGREGATION | This formula aggregates a collection with no applicable values, which has no defined result. | Emitted in Phase 2 |
EXPR_GROUP_KEY_NOT_STRING | Grouping in this formula requires a text key, and this key is not text. | Emitted in Phase 2 |
EXPR_NO_MATCH | This formula expected to find exactly one matching element, but none of the elements matched. | Emitted in Phase 2 |
EXPR_MULTIPLE_MATCHES | This formula expected to find exactly one matching element, but more than one element matched. | Emitted in Phase 2 |
EXPR_COALESCE_EXHAUSTED | Every value given to this fallback function was absent or null, so it has no result to fall back to. | Emitted in Phase 2 |
EXPR_JOIN_NON_STRING | This formula joins values that are not all text. Convert each value to text explicitly first. | Emitted in Phase 2 |
EXPR_STRING_INDEX_OUT_OF_RANGE | This formula accesses a position in a piece of text that does not exist. | Emitted in Phase 2 |
EXPR_INVALID_DATE_PATTERN | This date pattern uses a token that rule-line does not recognize. | Emitted in Phase 2 |
EXPR_DATE_PARSE_FAILED | This text could not be read as a date using the pattern that was given. | Emitted in Phase 2 |
EXPR_UNKNOWN_TIMEZONE | This ruleset's declared timezone is not one rule-line recognizes. | Emitted in Phase 2 |
EXPR_MISSING_PRESENT_INSTANT | A date/time function needing the current moment was evaluated without one available. | Emitted in Phase 2 |
EXPR_LOCAL_TIME_NONEXISTENT | This local date/time does not exist in the ruleset's declared timezone, because the clock skipped over it; it was moved forward to the next time that does exist, and the run continued. | Emitted in Phase 2 |
PATH_INDEX_OUT_OF_RANGE | This data-access path reaches for a position in a collection that is beyond its bounds. | Emitted in Phase 2 |
PATH_INDEX_NOT_INTEGER | This data-access index or bound is not a whole number, so it cannot name a position. | Emitted in Phase 2 |
PATH_TARGET_NOT_ARRAY | This data-access path applies array-only syntax to a value that is not an array. | Emitted in Phase 2 |
RE_INVALID_PATTERN | This regular expression pattern could not be read as valid syntax. | Emitted in Phase 2 |
RE_DISALLOWED_CONSTRUCT | This regular expression uses a construct that rule-line disallows because it can run catastrophically slowly. | Emitted in Phase 2 |
RE_DISALLOWED_FLAG | This regular expression uses a flag that rule-line does not permit. | Emitted in Phase 2 |
RE_INPUT_TOO_LONG | The text given to this regular expression is longer than rule-line allows a pattern to be applied to. | Emitted in Phase 2 |
RE_ANCHOR_IN_WHOLE_MATCH | This regular expression already anchors itself, and rule-line cannot safely add its own anchoring around it. | Emitted in Phase 2 |
PATH_STEP_REFERENCE_UNRESOLVED | This formula references another step whose output could not be resolved in this ruleset (Phase 3). | Reserved — first emitted in Phase 3 |
EXPR_FALLBACK_TYPE_MISMATCH | A step's declared fallback value does not match that step's declared output type (Phase 3). | Reserved — first emitted in Phase 3 |