Skip to content

This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.

Error codes

When a line fails, the engine says two things about it. The message is a sentence for the person reading the note, such as mass and length cannot be added. The code is a short fixed name for the kind of failure, such as INCOMPATIBLE_UNITS, for the program showing the note: it is what a host branches on to underline a line, offer a fix or count failures, without reading the sentence.

The two change on different terms. A message may be reworded in any release. A code a host can receive keeps its name (see versioning and support), so this page only grows.

A code reaches a host in one of three places:

  • error.code on the EngineError that evaluateExpression or evaluateLine throws, for a line the engine cannot read or run at all;
  • value.errorCode on the error value a line returns, for a line the engine ran but could not answer;
  • errorCode on a document line or inline solve from parseDocument or evaluateDocument, for a line that threw, beside its error message, and on the error value in its result for one that returned. See using the engine from TypeScript.

The Arrives column says which way each code comes: thrown, as a value, or either. Either means the engine raises it both ways in different places, or through a helper whose choice depends on the line, so a host should be ready for both.

The same list is in the package, for a program that wants to check a code it has met:

import { ERROR_CODE_CATALOGUES, isCataloguedErrorCode } from "solve-engine/packages";
ERROR_CODE_CATALOGUES.CoreErrorCodes.INCOMPATIBLE_UNITS; // "INCOMPATIBLE_UNITS"
isCataloguedErrorCode("INCOMPATIBLE_UNITS"); // true
isCataloguedErrorCode("CRYPTO_QUERY_FAILED"); // true: a run-time pattern
isCataloguedErrorCode("NOT_A_CODE"); // false

A package outside this repository can answer with codes of its own, so a code missing from this page is not necessarily a fault: it is one the engine does not ship. The engine and its built-in packages ship 571 codes, grouped below by the part of the engine that raises them.

In the package as ERROR_CODE_CATALOGUES.CoreErrorCodes.

Parser

CodeArrivesWhen it arises
INVALID_NUMBER_LITERALthrownA number written in a form that does not read as one: a hex, binary or octal literal with a digit its base lacks (0xZZ), or thousands groups that are not three digits long. The reader fixes the digits.
UNTERMINATED_STRINGthrownA " that is never closed, as in "abc. Raised by the lexer; the reader closes the text.
DIRECTION_CONTROL_IN_NAMEthrownA name, number or unit holds an invisible character that changes the direction text is shown in (U+202A to U+202E, U+2066 to U+2069, U+200E, U+200F, U+061C), so it would show as something other than what the engine reads. The message names the character by its code point; the reader deletes it. Text in quotes, a comment, a heading and a label keep such characters.
NO_PREFIX_PARSELETthrownA line has something where a value should start that cannot start one: the * in 2 + * 3, the ) in round(3.14, ), the > in (5 km) -> miles. Thrown with a span on the character and, where there is an obvious next step, a suggestion.
UNEXPECTED_END_OF_INPUTthrownA line stops before its expression does: 5 +, (2 + 3, sqrt(. Thrown with an empty span just after the last character, where an editor puts the caret, and a suggestion.
UNEXPECTED_TOKEN_TYPEthrownA form needed one particular thing next and found another: a ) where a , stands, or dice notation (roll 1d6) where a range was expected. Thrown with a span and a suggestion.
NESTING_DEPTH_EXCEEDEDthrownBrackets, or other nested forms, deeper than the parser allows (validation.maxNestingDepth, 50 by default). A safety limit against input built to exhaust the stack; the reader flattens the line.
UNEXPECTED_ENDthrownThe same as UNEXPECTED_END_OF_INPUT, raised where a line ends before an expression starts at all.
UNEXPECTED_TRAILING_TOKENthrownA complete expression followed by more that is not part of it: the , in 1,5 + 1, the 3pm in February 2026 3pm. Thrown rather than answered with the first half, which would be a wrong answer.
PARSE_ERROReitherThe generic parse failure, kept for a caller that wraps one without a more specific code.
TOO_MANY_NUMERIC_CONSTANTSthrownOne line with more distinct number literals than a compiled program can index. A safety limit; the reader splits the line.
BYTECODE_OPERAND_OUT_OF_RANGEthrownA compiled operand outside 0 to 255, or a jump outside the program. A package-authoring fault, reported at compile time rather than letting the program read the wrong constant.
TOO_MANY_STRING_CONSTANTSthrownOne line with more distinct text literals than a compiled program can index. A safety limit; the reader splits the line.
NO_MATCHING_PHRASE_ALTERNATIVEthrownA phrase that starts a form (roll, clamp) followed by none of the words that continue it. The message names the words that may come next.
INVALID_PHRASE_PATTERNthrownA package declared a phrase pattern whose alternative does not begin with a keyword. An authoring fault, raised when the pattern is built.
PHRASE_KEYWORD_MISMATCHthrownA phrase form missing one of its words part-way through (roll between 1 6, with no and). The message names the word expected.
USER_FUNCTION_INVALID_PARAM_NAMEthrownA function definition (f(x, y) = ...) with something other than a name where a parameter goes.
USER_FUNCTION_NO_PARAMSthrownA function definition with no parameters, f() = ..., which would read the same as a call. A definition needs at least one.
FUNCTION_BODY_MUST_BE_SYNCHRONOUSthrownA function definition whose body reaches live data (weather, stocks, a currency rate). Refused when it is defined, since a function body must be synchronous.
FUNCTION_BODY_READS_LINESthrownA function definition whose body reads other lines (f(x) = x + prev, x + line 1, a total above, a tag or a table column). Refused when it is defined, since a body runs wherever it is called, with no document lines to read; the value is passed in as an argument instead.
HELD_EXPRESSION_READS_LINESthrownA held expression that reads other lines (map(x + prev, 1:3), sum(x + line 1, 1:3), plot x + prev from 0 to 1, der(x^2 + prev, x)). Refused when the line is read, since the expression is worked out away from the line, with no lines to read; the message says to name the line’s value first (p = prev) and use the name.
TOO_MANY_FUNCTION_DEFINITIONSthrownOne line defining more functions than a compiled program can index. A safety limit, of the same kind as TOO_MANY_NUMERIC_CONSTANTS.
TOO_MANY_ANONYMOUS_BODIESthrownOne line with more map or reduce bodies than a compiled program can index. A safety limit, of the same kind as TOO_MANY_FUNCTION_DEFINITIONS.
UNKNOWN_PLUGIN_FUNCTIONeitherA parselet emitted a call to a plugin function by a name no registered package declares, or before its package registered. A package-authoring or registration fault, not the reader’s line.
PLUGIN_CALL_FAILEDas a valueA plugin function’s promise was rejected. The line reports the rejection’s message rather than waiting again.
PLUGIN_RESULT_NOT_A_VALUEas a valueA plugin function’s promise resolved to something that is not a Value. An authoring fault, reported on the line.

VM

CodeArrivesWhen it arises
EVALUATION_ERRORthrownA line failed and no more specific code was kept for it. A fallback; the message says what happened.
INSTRUCTION_LIMIT_EXCEEDEDthrownOne evaluation ran more VM instructions than vm.maxInstructions allows. A safety limit against a line that would run too long; the host may raise the limit.
STACK_LIMIT_EXCEEDEDthrownOne evaluation grew the VM stack past vm.maxStackDepth. A safety limit; the reader simplifies the line.
ALLOCATION_LIMIT_EXCEEDEDthrownOne evaluation asking for more elements (list cells, matrix cells) than vm.maxAllocatedElements allows, even inside a single operation. A safety limit that describes this line; the host may raise it.
STACK_UNDERFLOWthrownThe VM read more values than its stack held: corrupted bytecode or a faulty plugin. Worth reporting; the engine stays usable and only this line fails.
UNDEFINED_VARIABLEthrownA line reads a name no line above defines. Thrown with no span, and with the nearest defined names in suggestion and context.didYouMean when there are any.
GLOBAL_VARIABLE_NOT_RESOLVEDthrownA global :name read before its value arrived from the shared store. It resolves on a later evaluation.
UNKNOWN_FUNCTIONthrownA call to a name that is not a function the engine or a package provides. The nearest names are offered where there are any.
UNEXPECTED_PENDING_RESULTthrownA caller that asked for a settled value was handed one still waiting on live data. A caller-contract fault inside the engine, worth reporting.
UNDEFINED_FUNCTIONeitherA call to a function of the reader’s own that no line defines, or a definition the VM could not complete.
FUNCTION_ARITY_MISMATCHeitherA function of the reader’s own called with a different number of arguments than it was defined with.
BUILTIN_ARITY_MISMATCHthrownA built-in function called with the wrong number of arguments: sqrt(), atan2(1), sqrt(1, 2, 3). Separate from FUNCTION_ARITY_MISMATCH, so a host can word the two differently.
USER_FUNCTION_ASYNC_UNSUPPORTEDthrownA function of the reader’s own whose body reaches live data (weather, stocks, a currency rate). Function bodies must be synchronous.
MAP_REDUCE_ASYNC_UNSUPPORTEDthrownA map or reduce body that reaches live data while it runs. Refused at parse time first (MAP_REDUCE_TRANSFORM_MUST_BE_SYNCHRONOUS); this is the run-time guard.
SYMBOLIC_ASYNC_UNSUPPORTEDthrownAn algebra verb’s expression that reaches live data while it runs. Refused at parse time first (SYMBOLIC_ARGUMENT_MUST_BE_SYNCHRONOUS); this is the run-time guard.
EXPLAIN_ASYNC_UNSUPPORTEDthrownexplainLine() asked to derive a line that resolves data asynchronously (a live-data or async-plugin line). A derivation is a sequence of settled intermediate values, which a pending result has none of, so the line is refused rather than explained with a hole in it.
TRACE_NO_DOCUMENTthrowntraceLine() called with no document to read: the engine has no attached document model and no parseDocument result was passed as options.document. A trace follows one line into the lines above it, so without a document there is nothing to follow.
TRACE_NO_SUCH_LINEthrowntraceLine() asked for a line number the document does not have (below 1, past the last line, or not a whole number).
FUNCTION_RECURSION_LIMIT_EXCEEDEDthrownA function of the reader’s own that calls itself too deeply, as f(x) = f(x) does. Refused by name rather than overflowing the native stack.
FUNCTION_CALL_LIMIT_EXCEEDEDthrownOne evaluation making more calls to functions of the reader’s own than the budget allows, however shallow each call is. A safety limit against a chain of functions that multiplies its calls.
DATE_OFFSET_LIMIT_EXCEEDEDthrownA <date> + N workdays offset outside date.maxOffsetYears and date.minOffsetYears. Workdays walk the calendar a day at a time, so their cost is the offset.
WORKDAY_OFFSET_EXPECTED_DATEas a valueN working days after <x> (or before, from) where <x> is not a date, as in 5 working days after 3.
WORKDAYS_BETWEEN_EXPECTED_DATESas a valueworking days between <a> and <b> where one end is not a date.
WORKDAYS_BETWEEN_RANGE_TOO_LARGEas a valueworking days between two dates further apart than date.maxOffsetYears and date.minOffsetYears allow the count to walk.
BIGINT_SHIFT_LIMIT_EXCEEDEDthrownA << or >> on a big integer whose exact result would be too large to compute. Refused rather than answered in doubles as Infinity.
BIGINT_POW_LIMIT_EXCEEDEDthrownA ^ on a big integer whose exact result would be too large to compute (2n ^ 100000). Refused rather than answered as Infinity; a fractional or negative exponent uses doubles instead.
BIGINT_INEXACT_OPERANDthrownA value with no whole-number form (a fraction, an infinity) meeting a big integer: 1n + 0.5, 5n / pi.
BIGINT_DIVISION_BY_ZEROthrown10n / 0n or 10n mod 0n. A big-integer division is exact, and an exact division by zero has no answer, unlike 1 / 0, which is Infinity.
BASE_NOT_FINITEas a valueAn infinity or a result with no value written in a base: (1/0) in hex, 2^4000 in binary, hex(1/0). It has no digits; a whole number written with n (2n^4000) keeps every digit.
INTERNAL_MISSING_FUNCTION_BODYthrownA compiled program naming a function body it does not carry. A compiler or VM fault, worth reporting.
INTERNAL_MISSING_ANONYMOUS_BODYthrownA compiled program naming a map or reduce body it does not carry. A compiler or VM fault, worth reporting.
UNKNOWN_BUILTIN_FUNCTIONas a valueA compiled call to a built-in function at an index none is registered at. Reachable only through a compiler or snapshot fault; worth reporting.

Malformed bytecode

CodeArrivesWhen it arises
MALFORMED_BYTECODE_TRUNCATEDeitherAn operand byte read past the end of the stream: the program ends in the middle of an instruction.
MALFORMED_BYTECODE_CONSTANT_INDEXeitherA constant-pool operand indexing a numbers/strings entry that does not exist, or that is not of the pool’s type.
MALFORMED_BYTECODE_OPERAND_TYPEeitherA unit or converter name read off the value stack that is not a string. Distinct from the pool case above: the operand is a Value another opcode pushed, not a pool entry.
MALFORMED_BYTECODE_BODY_KINDeitherA map or reduce instruction carrying a body kind other than 0, 1 or 2.
MALFORMED_BYTECODE_BIGINT_LITERALeitherA big-integer constant in the program that is not a whole number, such as "1.000".
MALFORMED_BYTECODE_PROGRAMthrownexecuteBytecode called with something that is not a runnable program at all.
MALFORMED_BYTECODE_UNKNOWN_OPCODEeitherAn instruction the VM does not have, refused at the offset that carries it (in the error’s context).

Symbolic algebra

CodeArrivesWhen it arises
SYMBOLIC_RATIONAL_OVERFLOWthrownA coefficient grew past RATIONAL_MAX_BITS, e.g. repeated exact elimination multiplying denominators together.
SYMBOLIC_NONFINITE_OPERANDeitherNaN or ±Infinity reaching a symbolic expression, neither of which has an exact rational value.
SYMBOLIC_DIVISION_BY_ZEROeitherAn exact symbolic division by zero, such as expand((x+1)/0): refused where the quotient is written, as a value, and thrown from the rational arithmetic beneath. The zero is exact, so a very small number is not mistaken for one.
SYMBOLIC_QUANTITY_OPERANDas a valueArithmetic between an unknown and an amount with a unit, such as foo * 5 km =>: a formula has nowhere to keep the unit, so the line is refused rather than answered with the unit dropped.
SYMBOLIC_NODE_LIMIT_EXCEEDEDthrownA tree exceeding SYMBOLIC_MAX_NODES entering the simplifier.
SYMBOLIC_FORMULA_VALUE_UNSUPPORTEDas a valueA name holding a formula written before one of its unknowns had a value (y = x + 1 above x = $5), read after that unknown was given money, a quantity in a unit, a date or text, which the formula cannot take. Returned by the read rather than a formula mixing the value with the unknown (#732).
SYMBOLIC_UNSUPPORTED_FUNCTIONas a valueA builtin with no symbolic reading (min, random, the finance block, …) applied to an expression still containing an unknown. Returned rather than computing against toNumber()’s placeholder zero.
SYMBOLIC_FACTOR_LIMIT_EXCEEDEDthrownfactor of a cubic or higher whose rational roots cannot be searched: a coefficient too long a fraction to list its divisors (factor(x^3 - pi)), or a candidate set past FACTOR_MAX_ROOT_CANDIDATES. A quadratic is decided by its discriminant instead and never raises it.
SYMBOLIC_SOLVE_UNSUPPORTEDas a valueAn equation outside what the solver attempts: above the degree ceiling, non-linear in the unknown while another unknown is present, or not a polynomial and not evaluable numerically either (another unknown in it, an imaginary constant, a function with no numeric form). A non-polynomial equation in one unknown is solved numerically instead (see symbolic/NumericSolve.ts).
SYMBOLIC_SOLVE_INCOMPLETEas a valueSome but not all of an equation’s roots were found. Reported rather than returned, because a partial list of roots looks exactly like a complete one.
SYMBOLIC_SOLVE_NO_ROOT_FOUNDas a valueA numerically solved equation whose two sides never cross in the range searched. Not “no solution”: a search that found nothing has not shown there is nothing, and the message names the range and what the search cannot see.
SYMBOLIC_SOLVE_TOO_MANY_ROOTSas a valueA numerically solved equation with more roots in the range than NUMERIC_ROOTS_MAX, as a periodic one has, or whose two sides compare equal across a whole stretch. Declined rather than listed, because a list cut off at the edge of the search would read as complete.
SYMBOLIC_BOUND_INVALIDas a valueA bound of integral, an end of solve’s search range, or limit’s point that is not a plain finite number: it carries a unit, still contains an unknown, is not a number, or (for solve and limit) is infinite.
SYMBOLIC_REQUIRES_BOTH_BOUNDSthrownintegral(f, x, a) or solve(eq, x, a): one number after the unknown where the form takes two. A parse error naming the form, rather than a missing closing parenthesis.
SYMBOLIC_REQUIRES_LIMIT_POINTthrownlimit(f, x) with no point for the unknown to approach.
SYMBOLIC_INTEGRAL_IMPROPERas a valueA definite integral with an infinite bound, or whose integrand has no finite value somewhere in the range (1/x from 0 to 1). Improper integrals are refused by name rather than evaluated.
SYMBOLIC_INTEGRAL_UNSETTLEDas a valueA definite integral whose numeric estimate did not settle within the quadrature’s budget, which is what an integrand growing without bound inside the range, and so a diverging integral, looks like.
SYMBOLIC_LIMIT_DIVERGESas a valueA limit where the expression grows without bound (1/x^2 at 0).
SYMBOLIC_LIMIT_SIDES_DISAGREEas a valueA limit whose left and right sides settle on different values (abs(x)/x at 0). The message names both.
SYMBOLIC_LIMIT_UNSETTLEDas a valueA limit whose values never settle on one number (sin(1/x) at 0).
SYMBOLIC_LIMIT_UNDEFINEDas a valueA limit of an expression with no real value near the point on either side.
SYMBOLIC_LIMIT_UNSUPPORTEDas a valueA limit of an expression that cannot be evaluated numerically: another unknown in it, an imaginary constant, or a function with no numeric form.
SOLVE_REQUIRES_VARIABLE_NAMEeithersolve’s second argument not being a bare name.
SYMBOLIC_DERIVATIVE_ORDER_LIMITthrownA derivative order outside 0..DERIVATIVE_MAX_ORDER.
SYMBOLIC_INTEGRAL_UNSUPPORTEDas a valueAn indefinite integral with no known elementary antiderivative, reported rather than approximated, since a wrong integral is indistinguishable from a right one at the point of use. For a definite integral, one with no antiderivative that also cannot be evaluated numerically (another unknown in it, or a function with no numeric form).
SYMBOLIC_TAYLOR_DEGREE_LIMITthrownA Taylor degree outside 0..TAYLOR_MAX_DEGREE.
SYMBOLIC_TAYLOR_INEXACTthrownA Taylor coefficient that does not reduce to an exact number at the expansion point.
SYMBOLIC_REQUIRES_VARIABLE_NAMEeitherAn algebra verb’s variable-name argument not being a bare name.
SYMBOLIC_JACOBIAN_NO_VARIABLESas a valuejacobian called with expressions containing no unknown to differentiate against.
INTERNAL_RATIONAL_PARSEthrownA finite number whose decimal form could not be read back, which the regex covering every Number.prototype.toString output should make unreachable.

Engine

CodeArrivesWhen it arises
EXPRESSION_TOO_LONGthrownA line longer than validation.maxExpressionLength characters. Refused before it is read; the host may raise the limit.
EXPRESSION_TOO_COMPLEXthrownA line whose complexity score passes validation.maxComplexity. Refused before it is read; the host may raise the limit.
DOCUMENT_TOO_LARGEthrownA document with more lines than performance.maxDocumentLines. The per-line limits above bound what one line may ask for and say nothing about how many lines there are; two hundred thousand of 1 + 1 exhausted the heap on the line records alone. Recoverable.
NORMALIZED_TOKEN_LIMIT_EXCEEDEDthrownThe normaliser grew a line’s tokens past its safety limit. A guard against a rule that expands without end.
NORMALIZER_PASS_LIMIT_EXCEEDEDthrownThe normaliser was still changing the token stream after its pass budget (maxPasses, 100 by default): a rule chain that never settles. Reported rather than returning whatever the last pass left. Recoverable.
THEREFORE_REQUIRES_EXPRESSIONthrown"=>" with nothing before it, needs an expression or variable name to solve/simplify.
THEREFORE_ASYNC_UNSUPPORTEDthrownA "=>"-triggered expression called an async plugin (weather/stocks/currency). Same v1 scope restriction as user-function/map-reduce bodies.
COMPOUND_ASSIGN_REQUIRES_EXPRESSIONthrownA compound assignment (name += expr / name -= expr) with nothing on the right, a line half-typed on the way to total += 5.
COMPOUND_ASSIGN_ASYNC_UNSUPPORTEDthrownA running total (+= / -=) whose right-hand side calls an async plugin (weather/stocks/currency). The same v1 scope restriction as the "=>" and user-function bodies.
UNKNOWN_SAVINGS_PERIODthrownA savings-goal contribution period that is not one of daily/weekly/monthly/yearly (how long to save $X at $Y <period>). Names the accepted set.
INVALID_TIME_LITERALthrownColon-separated numbers that are not a time any clock can show (“24:00”, “9:60”, “100:5”). Raised by the labeled-line fallback, which used to answer them with whatever stood after the colon.
TERNARY_UNSUPPORTEDeitherA choice written condition ? value : other (true ? 25 : 30). There is no such operator; the message spells the line as if ... then ... else. Raised by the labelled-line fallback, which used to read true ? 25 as a label and answer 30.
LABEL_NOT_A_NAMEeitherText before a colon that is a comparison, an assignment, or a calculation or bracketed figure with no word in it (a > b: 1, (1+2): 5, (24):00), so not a label naming the figure after it. Raised by the labelled-line fallback, which used to answer with the figure whatever the text said.
OTHER_SCRIPT_DIGITSeitherA figure in digits from another script (٢٤:00, Total: ٢٤:00, Arabic-Indic for 24) standing before a colon where a number would be an operand. Numbers are read in the digits 0 to 9 only, and the labelled-line fallback used to take the figure as a label and answer with what followed the colon. The message spells the figure in 0 to 9.
INVISIBLE_CHARACTER_IN_NUMBEReitherA figure in 0 to 9 holding an invisible character that is not a direction control (a zero-width joiner or non-joiner, a word joiner, a soft hyphen), standing before a colon where a number would be an operand (<U+200D>24:00). The character makes the figure a word, which the labelled-line fallback used to take as a label and answer with what followed the colon. The message names the character by its code point; the reader deletes it. A direction control in the same place is DIRECTION_CONTROL_IN_NAME.
NETWORK_DISABLEDas a valueA live-data form evaluated on an engine whose host switched the network off (network.enabled: false, see constants/Configuration.ts’s NetworkConfig). A recoverable Error value, raised by the VM for a currency conversion with no primed rate and for a plugin function that returned a promise, and by createQueryResolver’s plugin function when its preflight was skipped. Names the setting, so the reader knows it is policy rather than an outage.

What-if

CodeArrivesWhen it arises
WHAT_IF_OVERRIDE_INVALIDthrownengine.whatIf(text, overrides) was given an override whose name is not a variable name, or whose value is not a finite number, text that evaluates on its own, or a Value. Thrown, since it is the host’s argument that is wrong rather than a line of the note.
WHAT_IF_INPUT_NOT_USEDeitherA what-if overrides a name no line it re-runs mentions, which cannot change any answer and is almost always a misspelling. Thrown by engine.whatIf; returned as an Error value by the line N with ... and sweep forms.
WHAT_IF_WRITES_GLOBALeitherA what-if would re-run a line that sets a global :name. A global is shared with every other document in the process, so the scenario’s value would reach them; refused rather than re-run. Thrown by engine.whatIf; returned as an Error value by the line forms.

Frozen answers

CodeArrivesWhen it arises
FROZEN_VALUE_MISSINGas a valueA line ending frozen on <day> whose engine holds no value frozen that day, and the day is not today. A recoverable Error value, raised by the VM in place of running the line: a frozen answer is never fetched again, so the line is refused rather than frozen at today’s figure. The message names the day, and the day of the value that is stored when there is one.
FROZEN_UNSUPPORTEDthrownfrozen on a line with no single answer to keep: a function definition, a global cell write, or a definition part-way through the line. Raised at compile time, naming the shape.
FROZEN_DATE_EXPECTEDthrownfrozen on followed by something that is not a single date at the end of the line (frozen on tuesday, a bare frozen on). Raised at compile time, with an example of the form. A day that does not exist (frozen on 2026-02-30) reports the date literal’s own error instead.

Temporal calendar backend

CodeArrivesWhen it arises
TEMPORAL_IMPLEMENTATION_INVALIDthrowncreateTemporalCalendar() was handed something that is not a usable Temporal implementation: no Now.instant, Now.timeZoneId, Instant.fromEpochMilliseconds or PlainDateTime.from. Raised at construction, naming the missing member, rather than letting the first date computation fail on it obscurely.
TEMPORAL_TIME_ZONE_UNKNOWNthrownThe timeZone given to createTemporalCalendar() is not one the Temporal implementation knows. Raised at construction, so a misspelt zone is a configuration error the host sees once, not a RangeError from inside every date the engine computes.

Calendar backend clocks

CodeArrivesWhen it arises
DATE_CLOCK_INVALIDthrownThe clock a host gave a calendar backend (dateCalendarInZone(zone, { now }), createTemporalCalendar(Temporal, { now })) is not a function, answered something that is not a moment Date can hold (NaN, an infinity, a number past 8.64e15, not a number), or threw. Not a function is refused when the backend is built; a bad reading is refused on the line that read the clock (today, now), and the rest of the document goes on (#721, #826).

Snapshot / restore

CodeArrivesWhen it arises
SNAPSHOT_VERSION_MISMATCHthrownfromJSON() handed an object that is not a snapshot at all, or whose serialised-shape version does not match this engine’s reader. The versioning gate that refuses an incompatible snapshot clearly rather than restoring it wrongly. See engine/EngineSnapshot.ts’s assertRestorable().
SNAPSHOT_MALFORMEDthrownA snapshot with the right envelope but internally inconsistent contents (an unrecognised number sentinel, an unknown value tag). Distinct from a version mismatch: the format is right, the payload is not.
SNAPSHOT_UNSUPPORTED_VALUEthrownA value the snapshot format cannot yet represent (a symbolic value or matrix cell, a colour, a split, a chart, an IP subnet). toJSON catches it and leaves the value out (#665).
SNAPSHOT_PACKAGE_MISSINGthrownA snapshot calls a plugin function that no package registered on the restoring engine provides. Refused rather than restored, since the call would run whatever sits at its old index (#658).

Config

CodeArrivesWhen it arises
CONFIG_PATH_NOT_FOUNDthrownA configuration read or write named a path that does not exist. A host configuration fault.
INVALID_CONFIG_PATHthrownA configuration path not in the section.property form. A host configuration fault.
CONFIG_SECTION_NOT_FOUNDthrownA configuration path whose section does not exist. A host configuration fault.
CONFIG_PROPERTY_NOT_FOUNDthrownA configuration path whose property does not exist in its section. A host configuration fault.

Forms and settings without a catalogue of their own

CodeArrivesWhen it arises
CALENDAR_TEMPORAL_UNAVAILABLEthrowncalendar: "temporal" was asked for on a runtime with no Temporal. Refused rather than silently computing on Date, because a host that named Temporal did so to be sure what it was computing on. Recoverable.
TRIP_EXPECTED_ATthrownA trip form (cost to drive ...) was written without the at that separates its parts. Recoverable.
DIMENSIONS_EXPECTED_FORMthrownA width and a height were written with nothing asked of the pair (1920x1080 on its own). Recoverable.
RESIZE_EXPECTED_SHAPEthrownA resize was written without one of its parts: the dimensions, the to, the size, or the side it names. Recoverable.

Registering a package

CodeArrivesWhen it arises
PLUGIN_OPERATOR_COLLISIONthrownA package registered an operator the engine already has. Refused at registration, since a built-in operator cannot be overridden.
PLUGIN_OPERATOR_UNSUPPORTEDthrownA package registered an operator the scanner cannot read: not exactly two characters, or a first character the scanner does not class as an operator. Refused at registration rather than left to never fire.
PLUGIN_KEYWORD_COLLISIONthrownA package registered a keyword the engine already has. Refused at registration, since a built-in keyword cannot be overridden.
PLUGIN_CALL_FUSION_UNREACHABLEthrownA package’s callFusions names a word the engine already reads as something other than a plain word (a keyword, a built-in function, a unit), so the call could never fire. Refused at registration.
PLUGIN_UNIT_ALIAS_UNREACHABLEthrownA package’s unitAliases names a word the engine already reads as something other than a plain word (a unit, a keyword, a function), so the alias could never be read. Refused at registration (#762).
PLUGIN_UNIT_ALIAS_TARGET_UNKNOWNthrownA package’s unitAliases maps a word to something that is not a single unit the engine reads (mile, days), so the alias would have nothing to mean. Refused at registration (#762).
PLUGIN_UNIT_COLLISIONthrownA package registered a unit spelling the engine already has. Refused at registration, since a built-in unit cannot be overridden.
PACKAGE_ENGINE_VERSION_MISMATCHthrownA package’s declared IEnginePackage.engineVersion semver range doesn’t satisfy the running engine’s ENGINE_VERSION. See api/EngineVersionCompatibility.ts.
PACKAGE_ENGINE_VERSION_INVALID_RANGEthrownA package’s declared IEnginePackage.engineVersion isn’t a parseable semver range at all (a typo in the package’s own descriptor).
PACKAGE_NAME_MISSINGthrownA package was registered with no name, or an empty one, so nothing could name it to unregister it or report on it (#719).
PACKAGE_RESOLVER_FUNCTION_MISSINGthrownA package’s createQueryResolver watches for a plugin function the package does not declare, or was built for another package, so the call it waits for would never come (#719).
OPCODE_POOL_EXHAUSTEDthrownMore packages asked for opcodes of their own than the dynamic opcode range holds. A registration fault.
PLUGIN_FUNCTION_INDEX_POOL_EXHAUSTEDthrownMore plugin functions registered than a compiled call can index (65,536). A registration fault.
PLUGIN_FUNCTION_INDEX_TOO_LARGEthrownA plugin function’s index past the largest a compiled call can hold (65,535). A registration fault.

Value contracts: a caller checks isRateUnit() or isTimecodeUnit() first

CodeArrivesWhen it arises
INVALID_RATE_UNITeitherA rate unit read or built from parts that do not make one: a caller-contract fault inside the engine or a package, or x/y where x is already a rate.
INVALID_TIMECODE_UNITthrownA timecode unit read from a string that is not one. A caller-contract fault inside the engine or a package.

Exact decimals

CodeArrivesWhen it arises
INVALID_DECIMAL_LITERALthrownText read as an exact decimal that is not one. Raised while a number literal is compiled; the reader fixes the digits.
DECIMAL_DIVISION_BY_ZEROthrownAn exact decimal division reached the decimal layer with a zero divisor. An engine invariant: the operators refuse a zero divisor first, so this is worth reporting.
DECIMAL_INVALID_SCALEthrownAn exact decimal built with a negative or fractional scale. An engine invariant, worth reporting.
DECIMAL_NEGATIVE_POWERthrownA power of ten asked for with a negative exponent inside the decimal layer. An engine invariant, worth reporting.

Units and quantities

CodeArrivesWhen it arises
INCOMPATIBLE_UNITSas a valueTwo quantities that do not measure the same thing met where they must: 5 kg + 3 m, 5 kg to m. The message names both measures.
UNKNOWN_UNITas a valueA conversion or a unit named something that is not a unit (5 km in mies). The message offers the nearest spellings where there are any.
UNIT_AFTER_UNITas a valueA quantity followed by a second unit, as in 5 kg m: two units side by side are not a unit. The message suggests in for a conversion.
UNIT_IN_EXPONENTas a valueAn exponent carrying a unit, as in 2^(3 m). The message shows where the unit goes instead.
UNIT_POWER_UNSUPPORTEDeitherA quantity raised to a power that has no unit, as in 2s^2, or a unit written with a power the table does not spell. Only a length squared or cubed has one. A variance of quantities other than lengths, or of percentages, is refused with it too.
UNIT_ROOT_UNSUPPORTEDas a valueA square or cube root of a quantity whose root has no unit, as in sqrt(4 m), or of a negative area.
UNIT_PRODUCT_UNSUPPORTEDas a valueTwo quantities multiplied into something that is not a unit, as in $5 * $3. Lengths multiply into an area or a volume.
UNIT_QUOTIENT_UNSUPPORTEDas a valueTwo quantities divided into something that is not a unit: nothing cancels and the result would be a rate of a rate.
UNIT_RECIPROCAL_UNSUPPORTEDas a valueA number divided by a quantity with no reciprocal unit, such as a temperature.
CONVERT_NON_NUMERICas a valueSomething with no single amount (a list, text, a date) converted to a unit.
QUANTITY_NON_NUMERICas a valueSomething with no single amount combined with a quantity, as in a list plus 5 m.
CONSTANT_UNIT_UNSUPPORTEDas a valueA physical constant whose unit the engine cannot spell yet, converted or combined with a quantity. The constant stays a plain number.
CURRENCY_RATE_UNAVAILABLEas a valueA conversion between two currencies with no exchange rate available for the pair. A host with live data may prime a rate and evaluate again.
RATE_MISSING_DENOMINATOR_UNITas a valueA rate built with / whose right-hand side has no unit to be per.
RATE_MUL_LEFT_NOT_A_RATEas a valueA rate multiplication whose left-hand side is not a rate.
RATE_MUL_RIGHT_MISSING_UNITas a valueA rate multiplied by a value with no unit matching what the rate is per.
RATE_MUL_MEASURE_MISMATCHas a valueA rate multiplied by a quantity that measures something else than what the rate is per ($50/week * 3 kg).
RATE_CONVERT_NOT_A_RATEas a valueA conversion of a rate’s denominator applied to a value that is not a rate.
RATE_CONVERT_MEASURE_MISMATCHas a valueA rate’s denominator converted to a unit that measures something else ($50/week in kg).
UNCERTAINTY_WITHOUT_UNITas a valueA value with a tolerance (5 m +/- 1 cm) converted to a unit or combined with a quantity: a tolerance is read without its unit.
UNCERTAINTY_UNIT_MISMATCHas a valueA tolerance whose unit does not measure what its value does, or that has no rate to reach the value’s currency.

Arithmetic and functions

CodeArrivesWhen it arises
TEXT_ARITHMETICas a valueText used in arithmetic with a number, written after a sign (-"abc"), or given to a numeric function (sqrt("abc")). The message points at as number for text that holds a number.
TEXT_COMPARISONas a valueText in an order comparison ("5" > 3, "a" < "b"): text has no order a note would mean. Against a number the message says which side is text and, for text that holds a number, points at as number.
COLOUR_ARITHMETICas a valueA colour in arithmetic, a numeric function, an order or a conversion to a form of a number (#ff0000 + 2, sqrt(#ff0000), #ff0000 < 3). A colour is three channels, not one number; the message points at reading a channel out, as in red(#3366cc).
IPV6_ARITHMETICas a valueAn IPv6 address in arithmetic, a numeric function, a comparison with a number or a conversion with no whole-number reading (fe80::1 + 2). Its 128 bits are past what a number holds exactly; the message points at as int.
TEXT_NOT_A_NUMBERas a valueas number or int given text that is not a number.
REMAINDER_UNDEFINEDas a valueA remainder with no value: 5 mod 0, or the remainder of an infinite number.
QUOTIENT_UNDEFINEDas a valueA division with no single answer: 0 / 0 (either zero signed), or an infinity over an infinity. 5 / 0 is ∞ and is not refused.
POWER_NO_REAL_VALUEas a valueA negative number to a fractional power with no real value, as in (-1)^0.5, or a negative number’s root of even degree.
FUNCTION_DOMAINas a valueA function called outside the numbers it is defined for, such as ln(0). The message names the domain.
FUNCTION_TAKES_NUMBERas a valueA function that takes plain numbers given a quantity, as in sin(1 m), or a mix of numbers and quantities.
TRIG_UNDEFINEDas a valuetan at an odd multiple of a right angle, where the tangent has no value.
NOT_WHOLE_NUMBERas a valueA function that counts whole things (fact, nPr) given a fraction.
INVALID_FACTORIAL_INPUTas a valueA factorial of a negative number or a fraction.
FACTORIAL_OVERFLOWas a valueA factorial past 170!, the largest a double can hold.
PERMUTATION_OVERFLOWas a valueA permutation count past the largest number a double can hold.
COMBINATION_OVERFLOWas a valueA combination count past the largest number a double can hold.
INVALID_RANGEas a valueA range given backwards where order matters: a roll from 6 to 1, or a permutation or combination with more chosen than there are.
INVALID_INTEGER_OPERANDas a valuegcd or lcm given a number with no whole value (an infinity, or nothing).
NUMBER_THEORY_EXPECTED_INTEGERas a valueA number theory function (factor, isprime, modpow) given something that is not a whole number.
NUMBER_THEORY_DOMAINas a valueA number theory function given a whole number outside what it is defined for: factor(0), a modulus below 1, a negative exponent.
NUMBER_THEORY_NO_INVERSEas a valuemodinv of a number that shares a factor with the modulus, so no inverse exists.
FACTOR_TOO_LARGEas a valuefactor of a whole number past 2^64, which is refused rather than left to run.
PROPORTION_DIVIDE_BY_ZEROas a valueproportion whose first term is zero, so there is nothing to scale by.
WEIGHTED_AVERAGE_ZERO_WEIGHTas a valueA weighted average whose weights add up to zero.
STATISTIC_NOT_FINITEas a valueA standard deviation or variance of a list holding an infinity.
AGGREGATE_NON_NUMERICas a valueA list aggregate (total of, average of, a line range) meeting something that is not a number or a quantity. The message names what it found.
AGGREGATE_PERCENTAGE_MIXEDas a valueAn aggregate (sum(10%, 100), average of 10%, 5 m, max(10%, 0.5), total above over a column) meeting a percentage beside a value that is not one. Percentages alone answer a percentage (sum(10%, 20%) is 30%); the message names the percentage and the kind of the other value, and gives the percentage as the number it stands for.
PERCENTAGE_OF_QUANTITYas a valueA value written as a percentage that is not a proportion, such as a length.
PERCENTAGE_NOT_FINITEas a valueA value written as a percentage that is not a finite number: an infinity a division by zero gave (1/0 as %), or a value that is no number at all.
PERCENTAGE_OVERFLOWas a valueA value written as a percentage that is too large for its percentage, a hundred times it, to be held, as in 1e308 as %, or that is itself past the largest number that can be held, as in 2^2000 as %.
PERCENT_CHANGE_FROM_ZEROas a valueA percentage change from zero, which no percentage reaches. The message suggests the difference instead.
PERCENT_CHANGE_NEGATIVE_BASEas a valueA percentage change from a negative base, which has two readings. The message shows how to write the one meant.
PERCENT_CHANGE_FAILEDas a valueA percentage change that could not be worked out from its two values.
INVALID_RATEas a valueA rate of interest or inflation that cannot be used: not a percentage, not finite, or at or below -100%.
INVALID_TERMas a valueA loan or savings term that is not a length of time.
INFLATION_YEAR_OUT_OF_RANGEas a valueAn inflation adjustment for a year outside the bundled price index.
INVALID_DATETIME_OPas a valueA date moved by a plain number, or by a quantity that is not a length of time, or to between a date and something that is not one. The message says what a date moves by.
TIMECODE_FPS_MISMATCHas a valueTwo video timecodes at different frame rates added or subtracted.
UNKNOWN_AS_CONVERTERas a valueas <name> naming no converter any package registered.
FLOAT_TAKES_NUMBERas a valuefloat("hello"), float(5 km): float given something with no plain number, text that is not a number or a quantity with a unit. The reader passes a number (#828).
MULTIPLIER_TAKES_NUMBERas a value"hello" as multiplier, 5 km as multiplier: a multiplier asked of something that is not a plain number or a percentage. The reader converts a number (#829).
AS_CONVERTER_AMBIGUOUS_CASEas a valueas mw: the target, read regardless of case, could be two units whose prefixes differ only in case (mW and MW), so it is refused rather than guessed (#824).
AS_CONVERTER_PREFIX_CASEas a valueas MV when only mV is a unit: reading it regardless of case would turn a mega into a milli, so it is refused by name (#824).
PLOT_INVALID_RANGEas a valueA plot’s range whose ends are not finite numbers.

Lists, ranges and matrices

CodeArrivesWhen it arises
INVALID_RANGE_BOUNDas a valueA range (0:3) whose bounds are not plain numbers.
NON_INTEGER_RANGE_BOUNDas a valueA range whose bounds are not whole numbers (0.5:3).
DESCENDING_RANGEas a valueA range whose first bound is above its second (5:1). The message names each bound as written, with the number it came to, and suggests the other order.
RANGE_BOUND_GROUP_MALFORMEDthrownA number in a call written like a grouped range bound whose group is not three digits (sum(1,0000:1), sum(1,00:1)): refused by the lexer, since it is neither one bound nor plainly two arguments. The message says a space after the comma gives two.
RANGE_BEFORE_ANOTHER_ARGUMENTeitherA whole-number colon pair no clock reads, written as the first of several arguments to sum, total, prod, map or reduce (sum(100:200, 50)): a range is read only as the last argument. Refused by the normaliser; the message says where the range goes.
LIST_ROUNDING_NON_NUMERICas a valueA list rounded (to 2 dp, to 3 sf, round, ceil, floor) that holds a cell with no number to round: a true or false, or a formula with an unknown.
LIST_CONVERSION_UNSUPPORTEDas a valueA list of several numbers written as one: in scientific notation, as a fraction or a percentage, or in hex, binary or octal ([1234, 5678] as sci). Each value is converted on its own.
LIST_ARGUMENT_UNSUPPORTEDas a valueA list of several numbers given to a builtin that reads each argument as one number and has no answer for each cell (gcd([4, 6], 2), root(3, [8, 27]), atan2([1, 2], 1), isprime([2, 4])). The message points at map.
LIST_CELL_UNSUPPORTEDas a valueA list given to a function of one number that is worked out for each cell (sqrt, sin, ln, fact), or added to or taken from a percentage ([true, 2] + 10%), when a cell is not a number (a true or false, a formula with an unknown), when a cell has no real answer (sqrt([4, -9])), or when the answers come in different units.
LIST_PERCENTAGE_UNSUPPORTEDas a valueA percentage written before a plain list with + or - (10% + [100, 200]), or a percentage as a cell of a plain list ([10%, 20%], map(x%, [10, 20])). A list holds plain numbers, so it would keep the percentage as its fraction and add 0.1 where 10% was meant; the message gives the forms that work, [100, 200] + 10% or the fractions [0.1, 0.2].
LIST_CONDITION_UNSUPPORTEDas a valueA list as the condition of an if (if [1, 2] > 0 then 1 else 2), where one true or false is needed. A list compared with a value answers once per cell, so the message points at one cell (v[0] > 5) or at map to choose for each cell.
COLLECTION_TOO_LARGEas a valueA list or range with more elements than vm.maxCollectionSize allows. A safety limit; the host may raise it.
MATRIX_CELL_NON_NUMERICas a valueA list cell that is not a number or a quantity: a list inside a list, text, a date.
MATRIX_CELL_UNITS_DIFFERas a valueA list whose cells are quantities of different measures ([1 km, 2 kg]), or money in two currencies with no rate between them: a list holds one unit.
MATRIX_CELL_NO_UNITas a valueA list with a unit given a cell that has no amount in it: a true or false, a percentage or a formula beside a quantity ([true, 1 km]).
MATRIX_UNIT_OPERATION_UNSUPPORTEDas a valueA list with a unit in an operation its cells cannot take one by one: multiplied by another quantity, a number divided by it, or a percentage added.
MATRIX_UNIT_ALGEBRAas a valueMatrix algebra on a list with a unit (det([1 km, 2 km; 3 km, 4 km])): a determinant, an inverse, a matrix product or power, or a dot product.
DIMENSION_MISMATCHas a valueTwo matrices of shapes that do not fit the operation: added with different shapes, or multiplied where the columns of the first are not the rows of the second.
MATRIX_INDEX_NOT_A_MATRIXas a value[...] indexing or slicing applied to something that is not a matrix.
MATRIX_INDEX_OUT_OF_BOUNDSas a valueAn index or a slice past the edge of the matrix.
INVALID_MATRIX_SLICE_BOUNDas a valueA matrix slice whose bounds are not ranges.
DETERMINANT_REQUIRES_SQUARE_MATRIXas a valuedet of a matrix that is not square.
INVERSE_REQUIRES_SQUARE_MATRIXas a valueinv of a matrix that is not square.
SINGULAR_MATRIXas a valueinv of a matrix with no inverse: a zero, or nearly zero, pivot.
MATRIX_POWER_REQUIRES_SQUARE_MATRIXas a valueA matrix raised to a power that is not square.
MATRIX_POWER_REQUIRES_WHOLE_EXPONENTas a valueA matrix raised to a power that is not a whole number of 0 or more. ^-1 is the inverse and ^T the transpose.
MATRIX_POWER_UNSUPPORTEDas a valueA matrix used as an exponent, or ^ between a matrix and something with no matrix reading.
SYMBOLIC_INVERSE_DIMENSION_LIMITas a valueA symbolic matrix inverse larger than the size the symbolic elimination handles.
SYMBOLIC_SINGULAR_OR_UNSUPPORTED_PIVOTas a valueA symbolic matrix inverse that meets a zero pivot, which the elimination does not reorder around.
MAP_REDUCE_REQUIRES_COLLECTIONas a valuemap, reduce, sum or prod over something that is not a list or a range (sum(5)); the message names the word typed.
MAP_COLLECTION_LENGTH_MISMATCHas a valuemap over several lists of different lengths.
REDUCE_EMPTY_COLLECTIONas a valuereduce over an empty list with no starting value.

Reading other lines

CodeArrivesWhen it arises
LINE_REF_NO_DOCUMENTas a valueA line reference, total above or another cross-line form evaluated with no document, as evaluateExpression is. Evaluate the line in a document instead.
LINE_NOT_YET_EVALUATEDas a valueA reference to a line below the one reading it, or past the end of the document, which has no answer yet.
LINE_RESULT_ERRORas a valueA reference to a line whose own answer is an error. The referenced line is the one to fix.
LINE_RESULT_PENDINGas a valueA reference to a line still waiting on live data. It resolves when the data arrives.
LINE_FAILEDeitherA line read by another line in the batch pass, when it threw and no code was kept for it. A fallback: the code the line threw is used where there is one.

Solving equations for a matrix

CodeArrivesWhen it arises
EQUATION_FACTOR_UNDEFINEDas a valueA matrix equation (A * x = b) naming a factor no line defines yet.
EQUATION_FACTOR_NOT_MATRIXas a valueA matrix equation whose factor is not a matrix.
EQUATION_RHS_NOT_MATRIXas a valueA matrix equation whose right-hand side is not a matrix.
EQUATION_SEVERAL_UNKNOWNSthrownAn equation on a line of its own with two or more unknowns, as in (salary / 12) * rate / 100 = net. An equation line is solved for its one unknown, so the message says to give the others values above it or to name one with solve.

Goal seek, as the engine runs it

CodeArrivesWhen it arises
GOAL_SEEK_NO_DOCUMENTas a valueGoal seek with no document to re-run: the single-expression entry point, or the batch pass, which evaluates each line once. evaluateDocument and a live editor solve it.
GOAL_SEEK_NESTEDas a valueGoal seek run from inside another goal seek’s re-run, or targeting its own line. Refused, since the re-runs would compound.
GOAL_SEEK_LINE_NOT_READYas a valueGoal seek targeting a line with no evaluated expression: below it, past the end, or prose.
GOAL_SEEK_TARGET_IS_DEFINITIONas a valueGoal seek targeting the line that defines a variable, which a re-run would overwrite. The message says to target the line that uses it.
GOAL_SEEK_ASYNC_UNSUPPORTEDas a valueGoal seek targeting a line that depends on live data, which a re-run cannot fetch.
GOAL_SEEK_TARGET_ERRORas a valueGoal seek whose target line failed while it was being re-run. The message is the line’s own.

What-if and sweeps, re-running the document

CodeArrivesWhen it arises
WHAT_IF_LINE_OUT_OF_RANGEas a valueA what-if or a sweep naming a line the document does not have.
WHAT_IF_NESTEDas a valueA what-if or a sweep run from inside another one’s re-run of the document.
WHAT_IF_IN_GOAL_SEEKas a valueGoal seek targeting a line that holds a what-if or a sweep, whose every probe would re-run the document again.
WHAT_IF_TARGET_ERRORas a valueA what-if whose target line has no answer with the inputs given. The message is the line’s own.
WHAT_IF_TARGET_NOT_A_CALCULATIONas a valueA what-if targeting prose, a heading or a blank line, which has no answer to work out again.
WHAT_IF_TARGET_HAS_SEVERAL_ANSWERSas a valueA what-if targeting a line with several inline answers, so there is no one answer to give.
WHAT_IF_LIVE_DATAas a valueA what-if targeting a line that waits on live data, which a re-run does not fetch.

Live data

CodeArrivesWhen it arises
ASYNC_RESOLVER_FAILEDas a valueA live value that failed to fetch several times in a row, reported rather than retried again. Editing the line tries again.
SETTLE_TIMEOUTthrownawait engine.settle({ timeoutMs }) reached its deadline with live values still being fetched. Rejected rather than resolved, so a caller is never handed a Pending line as if it were settled; the context carries how many were in flight. Recoverable: the lines stay Pending and settle when their fetches land.
SETTLE_TIMEOUT_INVALIDthrownengine.settle was given a timeoutMs that is not a finite number of zero or more (a negative, NaN, an infinity, text). Rejected, since it is the host’s argument that is wrong.

Per-pass budgets

CodeArrivesWhen it arises
PASS_WORK_BUDGET_EXCEEDEDas a valueA document pass whose cross-line forms together re-ran more lines than vm.maxLineRunsPerPass allows. The line that crossed the budget is refused by name; the host may raise it.
DOCUMENT_ELEMENT_LIMIT_EXCEEDEDas a valueA document whose answers together keep more elements than vm.maxRetainedElements allows. The line that crossed it is refused, and a name it assigned is let go.

Fallbacks for a thrown value that is not an EngineError

CodeArrivesWhen it arises
UNEXPECTED_ERRORthrownSomething other than an EngineError was thrown and normalised. Worth reporting: it is an engine or package fault rather than the reader’s line.
UNKNOWN_ERRORthrownA thrown value that was not an Error at all, normalised. Worth reporting, as UNEXPECTED_ERROR is.

In the package as ERROR_CODE_CATALOGUES.DatetimeZoneErrorCodes.

CodeArrivesWhen it arises
TIME_ZONE_OFFSET_OUT_OF_RANGEeither2026-04-03 in UTC+25, time in UTC-5:60: a signed offset after UTC or GMT that no clock keeps (outside UTC-12 to UTC+14, sixty minutes or more, a fraction, or a time of day). An Error value from the VM’s in <zone> branch, and a parse error from the time package’s zone forms, each as that form refuses an unknown zone; both read the offset with calendar/UtcOffset.ts’s tryReadUtcOffset (#730).
DATETIME_ZONE_UNKNOWNas a valueA date converted in <name> where the name is neither a time zone the engine knows nor a unit, as in 2026-04-03 in Atlantis. The reader checks the zone’s spelling.
DATETIME_NOT_CONVERTIBLEas a valueA date converted in <unit> where the name is a real unit that a date has no reading in, as in 2026-04-03 in furlongs. Separate from DATETIME_ZONE_UNKNOWN, since the fix is different.
DATE_ZONE_UNKNOWNthrowndateCalendarInZone given a zone this runtime cannot compute in, as in "Europe/Atlantis". Raised when the host builds the calendar, not per line.
DATE_WEEKDAY_INVALIDthrowndate: { weekend: ["fri"] }: date.weekend or date.firstDayOfWeek named something that is not a day of the week. Raised at construction, because a weekend quietly ignored is every working-day answer quietly wrong (#702).

In the package as ERROR_CODE_CATALOGUES.CurrencyErrorCodes.

CodeArrivesWhen it arises
CURRENCY_API_ERRORthrownFrankfurter’s rates endpoint returned a non-OK HTTP status.
UNKNOWN_CURRENCY_CODEthrownA requested currency/crypto code isn’t in the fetched rate table, an unrecognized code, not an API failure.
CRYPTO_PRICE_API_ERRORthrownCoinGecko’s simple-price endpoint returned a non-OK HTTP status.

In the package as ERROR_CODE_CATALOGUES.HistoricalCurrencyErrorCodes.

CodeArrivesWhen it arises
HISTORICAL_RATES_NOT_CONFIGUREDas a valueThe host switched historical rates off (historicalRateProvider: null), so on <date> conversions cannot be answered. NOT a fall back to today’s rate.
HISTORICAL_RATE_QUERY_FAILEDeitherThe provider threw, timed out, or answered with something that is not a rate, for one pair/date. Transient, evicted after a cooldown so a retry can happen.
HISTORICAL_RATE_DATE_OUT_OF_RANGEthrownA dated conversion for a day the built-in Frankfurter rates do not cover: before 4 January 1999 (the ECB reference rates’ first day) or after today.
HISTORICAL_RATE_UNSUPPORTED_CURRENCYthrownA dated conversion for a currency the built-in Frankfurter rates do not quote: a cryptocurrency, or a code the ECB publishes no rate for.
HISTORICAL_RATE_NOT_PREFLIGHTEDas a valueThe VM reached the conversion before preflight cached its rate, a “shouldn’t happen” invariant break, not a user error.
HISTORICAL_CURRENCY_INVALID_OPERANDas a valueThe amount being converted was not a currency Value (bad bytecode, or a non-currency left operand).

In the package as ERROR_CODE_CATALOGUES.QueryResolverErrorCodePatterns.

CodeArrivesWhen it arises
<NAMESPACE>_QUERY_FAILEDas a valueA live value whose fetch failed (the provider threw, or the network did). The line is refused rather than answered with a stale or made-up value; a later evaluation retries after the cooldown.
<NAMESPACE>_NOT_PREFLIGHTEDas a valueA live value read before its fetch was started, which the engine’s preflight makes unreachable. Worth reporting if a host sees it.

In the package as ERROR_CODE_CATALOGUES.SnapshotErrorCodes.

CodeArrivesWhen it arises
SNAPSHOT_VERSION_MISMATCHthrownThe object handed to fromJSON is not a snapshot at all, or its version does not match this engine’s reader.
SNAPSHOT_MALFORMEDthrownA snapshot with the right envelope but internally inconsistent contents (a bad number sentinel, a missing field).
SNAPSHOT_UNSUPPORTED_VALUEthrownA value the snapshot format cannot yet represent (a symbolic expression or matrix cell, a colour, a split, a chart, an IP subnet). toJSON catches it and leaves the value out.
SNAPSHOT_PACKAGE_MISSINGthrownThe snapshot calls a plugin function that no package registered on the restoring engine provides. Refused rather than restored, since the call would run whatever sits at its old index (#658).

In the package as ERROR_CODE_CATALOGUES.DefineFunctionErrorCodes.

CodeArrivesWhen it arises
DEFINE_FUNCTION_INVALID_NAMEthrownThe spec’s name is not a single identifier. Thrown by defineFunction, before any engine sees it.
DEFINE_FUNCTION_INVALID_SPECthrownThe spec is otherwise malformed (bad args, unsupported type, missing call). Thrown by defineFunction.
DEFINE_FUNCTION_ARITY_MISMATCHthrownThe call site passed the wrong number of arguments. Raised at evaluation time.
DEFINE_FUNCTION_ARGUMENT_TYPEthrownAn argument was the wrong value type. Raised at evaluation time.
DEFINE_FUNCTION_RETURN_TYPEthrownThe call implementation returned a value that did not match returns. Raised at evaluation time, an authoring bug rather than a user one.

In the package as ERROR_CODE_CATALOGUES.WorkerErrorCodes.

CodeArrivesWhen it arises
WORKER_CANCELLEDthrownThe caller aborted the request through its AbortSignal.
WORKER_TERMINATEDthrownThe worker engine was torn down while a request was still in flight.
WORKER_TRANSPORT_FAILEDthrownThe transport failed or the worker exited before answering.
WORKER_UNKNOWN_METHODthrownA request named a method the runtime does not expose.
WORKER_NOT_INITIALISEDthrownA request arrived before the runtime finished building its engine.
WORKER_UNKNOWN_PACKAGEthrownAn init named a package the runtime could not resolve.
WORKER_ARGUMENT_NOT_CLONEABLEthrownA call’s arguments could not be copied across the boundary (a function, a symbol, an object postMessage refuses). Rejected main-side, before anything is sent.

In the package as ERROR_CODE_CATALOGUES.TagsErrorCodes.

CodeArrivesWhen it arises
TAG_NO_DOCUMENTas a valueA tag total evaluated with no document to read tagged lines from.
TAG_EMPTYas a valueA tag total or a breakdown with no lines carrying the tag, or no tagged lines at all.
TAG_NON_NUMERICas a valueA tagged line that is not a number or a quantity.
TAG_BREAKDOWN_NO_WHOLEas a valueA breakdown whose tagged lines add up to zero, so no tag has a share.

In the package as ERROR_CODE_CATALOGUES.ChartErrorCodes.

CodeArrivesWhen it arises
PLOT_EXPR_MUST_BE_SYNCHRONOUSthrownA plot whose expression reaches live data (weather, stocks, a currency rate), which a plot cannot wait for at every point.
SPARKLINE_NOT_A_SERIESas a valueas sparkline given something other than a list or a range of at least two numbers.

In the package as ERROR_CODE_CATALOGUES.ColourErrorCodes.

CodeArrivesWhen it arises
COLOUR_INVALIDas a valueA string was not a hex colour or a known CSS colour name.
COLOUR_EXPECTED_COLOURas a valueA function expected a colour argument and got something else.
COLOUR_BAD_ARGUMENTSas a valueA function was called with the wrong number or type of arguments.
UNKNOWN_COLOUR_FUNCTIONthrownA colour call (rgb(...), hsl(...)) by a name the colour package does not have.

In the package as ERROR_CODE_CATALOGUES.ConditionalsErrorCodes.

CodeArrivesWhen it arises
CHECK_EXPECTED_COMPARISONeitherA check whose statement is not a comparison. The message shows the forms a check takes.
CHECK_FAILEDas a valueA check whose comparison does not hold. The message says by how much; a host counts these through ParsingResult.checks.
CHECK_INCOMPARABLEas a valueA check between two values that cannot be compared: text with <, or quantities of different measures.
CHECK_JOIN_UNSUPPORTEDthrownA check whose comparisons are joined by something other than and: or, a bitwise operator, or a comparison after a within margin. The message says to join them with and or to bracket a side.
NOT_NEEDS_BOOLEANas a valuenot or a prefix ! before a value that is not true or false (not 5, !"yes"). The message names what the value is.

In the package as ERROR_CODE_CATALOGUES.ConstantsErrorCodes.

CodeArrivesWhen it arises
UNKNOWN_CONSTANTas a valueA physical constant asked for by a name the table does not have.

In the package as ERROR_CODE_CATALOGUES.ConvertersErrorCodes.

CodeArrivesWhen it arises
AS_CONVERTER_EXPECTED_NAMEthrownas followed by something that is not a converter name, as in 1 as as.
AS_CONVERTER_EXPECTED_NUMBERas a valueA number notation (as engineering, as compact) given something that is not a number or a quantity.
AS_CONVERTER_UNSUPPORTED_BASEthrownas base N for a base the engine cannot write numbers in. The message lists the bases it can.
INVALID_DECIMAL_PLACESthrownto N dp with a place count outside 0 to 100.
INVALID_SIGNIFICANT_FIGURESthrownto N sf with a count that is not a whole number from 1 to 17.
INVALID_ROUNDING_INCREMENTthrownto nearest ... followed by something that is not a positive number or a word such as ten or hundred.

In the package as ERROR_CODE_CATALOGUES.CookingErrorCodes.

CodeArrivesWhen it arises
GAS_MARK_EXPECTED_TEMPERATUREas a valueas gas mark was given something that is not an oven temperature.
GAS_MARK_OFF_THE_DIALas a valueAn oven temperature that no gas mark stands for, hotter or colder than the dial goes.
GAS_MARK_UNKNOWNas a valueA dial setting the table does not have, such as gas mark 12.
SERVINGS_NOT_POSITIVEas a valueA serving count that cannot scale a recipe, such as zero.

In the package as ERROR_CODE_CATALOGUES.CryptoErrorCodes.

CodeArrivesWhen it arises
CRYPTO_NOT_CONFIGUREDas a valueA crypto price asked for on an engine whose crypto package was created without a fetchPrice. The host supplies one through createCryptoPackage.

In the package as ERROR_CODE_CATALOGUES.DateFormErrorCodes.

CodeArrivesWhen it arises
DATE_EXPECTEDas a valueA date form (2nd Tuesday of, age of) given something that is not a date, as in age of 5.
DATE_FIELD_EXPECTED_DATEas a valueA question asked of a date (day of the week on, week number of) given something that is not a date.
DATE_OUT_OF_RANGEas a valueA timestamp outside the dates the engine can hold, about 273,000 years either side of 1970.
AS_ISO8601_NEEDS_DATEas a valueas iso8601 given something that is not a date, a Unix timestamp or ISO 8601 text.
AS_ISO8601_DURATION_TOO_LONGas a valueas iso8601 given a length of time too large for its parts to be written with exact digits, as in 1e300 seconds as iso8601.
INVALID_ISO8601_STRINGas a valueText given as an ISO 8601 date or time that does not read as one.
INVALID_WEEKDAYas a valueA weekday given as a number that is not a day of the week.
MISSING_WEEKDAYthrownnext or last with no day of the week after it.
NTH_WEEKDAY_OUT_OF_RANGEas a valueAn ordinal weekday the month does not have, such as the fifth Monday of a month with four.
DAYS_IN_EXPECTED_PERIODthrowndays in followed by something that is not a month, a quarter or a year.
WORKDAYS_IN_EXPECTED_DURATIONas a valueworkdays in given a quantity that is not a length of time.
WORKDAYS_UNTIL_UNSUPPORTEDthrownworkdays until or workdays since, which are not counted on the calendar. The message points at workdays between.
AS_DATE_NEEDS_TIMESTAMPas a valueas date given a value that is neither a Unix timestamp, ISO 8601 text nor a date.
AS_TIMESTAMP_NEEDS_DATEas a valueas timestamp given a value that is neither a date, ISO 8601 text nor a Unix timestamp.
AS_TIME_NEEDS_DATEas a valueas time given something that is not a date, as in 5 as time. A number has no time of day of its own, so it is read as a date first: 1710000000 as date as time.
PERIOD_EXPECTEDthrownstart of or end of followed by something that is not a week, a month or a year.
WEEKDAY_ALONEthrownA day of the week alone on a line, which is read as a heading. The message points at this friday or next friday for the date.

In the package as ERROR_CODE_CATALOGUES.DatetimeErrorCodes.

CodeArrivesWhen it arises
DATE_INPUT_LOCALE_INVALIDthrowndate.inputLocale is not a BCP-47 locale tag ("en_US" with an underscore is the usual mistake). Raised at engine construction, because a locale that is silently ignored is a date order that is silently wrong.
DATE_ORDER_MISMATCHeitherA date-shaped run the resolved order cannot read, which another supported order can (12/25/2026 on a day-first engine), or a year-last run on a year-first engine, which has no day and month roles to apply to it. The message names the order actually used, the group that broke, the reading that would work, and the two ways out. A recoverable Error VALUE, never a throw, and suppressed by date.onAmbiguous: 'arithmetic'.
DATE_NOT_A_CALENDAR_DAYeitherA run whose shape is unmistakably a date attempt and which names no real day under any reading: 31/04/2026, 29/02/2026, 13/13/2026, 2026-02-29, 2026-13-01. Separate from DATE_ORDER_MISMATCH because no change of order fixes it, so the message must not suggest one.

In the package as ERROR_CODE_CATALOGUES.DerivedUnitsErrorCodes.

CodeArrivesWhen it arises
AS_UNIT_EXPECTED_QUANTITYas a valueas <unit> given a plain number or something else with no unit.
AS_UNIT_INCOMPATIBLEas a valueas <unit> given a quantity that does not measure what the unit does.

In the package as ERROR_CODE_CATALOGUES.EncodingErrorCodes.

CodeArrivesWhen it arises
ENCODING_EXPECTED_TEXTas a valueAn encoding form given something that is not text in quotes.
ENCODING_DECODE_FAILEDas a valueText that does not decode in the encoding named: not valid base64, not a JSON Web Token, not a query string.
UNKNOWN_ENCODINGas a valuefrom <name> naming an encoding the package does not know. The message lists the ones it does.

In the package as ERROR_CODE_CATALOGUES.FinanceErrorCodes.

CodeArrivesWhen it arises
CASH_FLOW_ARGUMENT_COUNTas a valueA cash-flow form given no flows, or npv given flows with no rate.
CASH_FLOW_EXPECTED_AMOUNTas a valueA cash flow that is not a finite amount of money or a plain number, or flows given both one by one and as a list.
CASH_FLOW_MISSING_RATEthrownnpv of ... with no at <rate> after the flows.
CASH_FLOW_TOO_FEWas a valueA cash-flow form given fewer than two flows: an outlay and a return are the least it reads.
CASH_FLOW_OUT_OF_RANGEas a valueA net present value beyond the range of a number at the rate given.
IRR_NO_SIGN_CHANGEas a valueirr of flows that never change sign (all money out, or all in), so no rate makes their value zero.
IRR_NONEas a valueirr of flows no rate above -100% brings to zero.
IRR_NOT_UNIQUEas a valueirr of flows with several internal rates of return. The message lists them rather than choosing one.
IRR_UNRESOLVEDas a valueirr of flows whose rates are too close together to tell apart.
PAYBACK_NO_OUTLAYas a valuepayback of flows whose running total is never below zero, so there is nothing to pay back.
PAYBACK_NEVERas a valuepayback of flows that never recover the outlay. The message says how far short the total ends.
INFLATION_EXPECTED_USDeither<amount> in <year> dollars of an amount in another currency that has its own index: the phrase asks for dollars.
INFLATION_EXPECTED_CURRENCYeither<amount> in <year> pounds or in <year> euros of an amount in another currency that has its own index: the phrase asks for that currency.
INFLATION_NO_INDEXas a valueAn inflation adjustment of an amount no bundled price index measures: a currency without one, a quantity that is not money, or a bare number.
INFLATION_EXPECTED_FROM_OR_INthrownwhat is <amount> followed by neither from <year> nor in <year> worth in <year>, as in what is $300 and $50 from 2003.
INFLATION_EXPECTED_YEARas a valueThe year of an inflation question that is not a plain whole number: money, a quantity, a date or a fraction, as in what is $100 from 1990.5.
INFLATION_EXPECTED_INFLATION_WORDthrownassuming <rate>% not followed by the word inflation.
SAVINGS_GOAL_SYNTAXthrownhow much per month to reach <target> followed by neither in nor over and the time the saving runs for.
UNKNOWN_COMPOUNDING_INTERVALthrowncompounding <interval> naming an interval the package does not know. The message lists the ones it does.

In the package as ERROR_CODE_CATALOGUES.RecurringScheduleErrorCodes.

CodeArrivesWhen it arises
RECURRING_INTERVAL_NOT_POSITIVEthrownevery 0 weeks and the like: the interval a payment repeats on has to be a positive count, or the number of payments is undefined.

In the package as ERROR_CODE_CATALOGUES.GeometryErrorCodes.

CodeArrivesWhen it arises
GEOMETRY_EXPECTED_SHAPEthrownA shape measure (area of) followed by something that is not a shape. The message lists the shapes.
GEOMETRY_ERRORas a valueA shape given a dimension that is not a length or a number, or a set of dimensions that make no shape.

In the package as ERROR_CODE_CATALOGUES.GoalSeekErrorCodes.

CodeArrivesWhen it arises
GOAL_SEEK_SYNTAXthrownA goal seek not written as solve line N for <name> = <target>. The message shows the form.
GOAL_SEEK_REQUIRES_VARIABLE_NAMEthrownA goal seek with no name to vary after for.
GOAL_SEEK_TARGET_NOT_NUMERICas a valueA goal seek whose target is not a finite number, or whose target line does not give a number for a value tried.
GOAL_SEEK_TARGET_UNIT_MISMATCHas a valueA goal seek’s target in a unit that cannot be compared with the target line’s answer: another measure, or money in another currency. The reader writes the target in the line’s unit (#835).
GOAL_SEEK_VARIABLE_NOT_USEDas a valueA goal seek varying a name its target line does not read, which could never move the answer.
GOAL_SEEK_NON_FINITEas a valueA goal seek whose target line gives no finite value for any input tried across the range, as 2^x does not far out and 1/x does not at zero. A value that is not finite for some inputs is a gap in the search, not this (#739).
GOAL_SEEK_NO_SOLUTIONas a valueA goal seek over a range in which the target line stays on one side of the target wherever it could be worked out, or whose exact answers all lie outside a stated range. The message names the range searched.
GOAL_SEEK_RANGE_INVALIDas a valueA goal seek’s between <low> and <high> whose ends are not two different finite numbers in the unknown’s measure (#739).
GOAL_SEEK_SEVERAL_SOLUTIONSas a valueA goal seek whose unknown carries a unit and whose line meets the target at several inputs. A list cannot carry the unit, so each value is named and the reader chooses with a range (#739).
GOAL_SEEK_TOO_MANY_SOLUTIONSas a valueA goal seek whose line meets the target at more inputs than a list of answers should hold, as a line built on sin or cos does (#739).
GOAL_SEEK_DID_NOT_CONVERGEas a valueA goal seek that did not reach the target within its steps, or narrowed to a point where the line jumps across it.

In the package as ERROR_CODE_CATALOGUES.HashErrorCodes.

CodeArrivesWhen it arises
HASH_EXPECTED_TEXTas a valueA hash function (sha256(...)) given something that is not text in quotes.

In the package as ERROR_CODE_CATALOGUES.HealthErrorCodes.

CodeArrivesWhen it arises
HEALTH_BAD_INPUTas a valueA health function given an argument of the wrong kind, such as a weight where a height goes. The message shows the call.

In the package as ERROR_CODE_CATALOGUES.KnowledgeErrorCodes.

CodeArrivesWhen it arises
KNOWLEDGE_NOT_CONFIGUREDas a valueA knowledge question asked on an engine whose knowledge package was created without an answerQuery. The host supplies one through createKnowledgePackage.

In the package as ERROR_CODE_CATALOGUES.LinesErrorCodes.

CodeArrivesWhen it arises
LINE_RANGE_NON_NUMERICas a valueA line range or an above aggregate reaching a line that is not a number or a quantity.
LINE_RANGE_EMPTYas a valueA line range or an above aggregate with no figures in it: every line blank, a heading, or the top of the document.
LINE_REFERENCE_DELETEDas a valueA reference to a line that has since been deleted. An editor that keeps references through edits writes it as line deleted.
SECTION_NO_DOCUMENTas a valueA section total evaluated with no document to read headings from.
SECTION_NOT_FOUNDas a valueA section total naming a heading the note does not have. The message lists the headings it has.
SECTION_AMBIGUOUSas a valueA section total naming a heading two or more headings share.
SECTION_EMPTYas a valueA section with no figures under its heading.
INPUTS_OF_SYNTAXthrowninputs of not followed by a line reference, as in inputs of line 4.
TRACE_CYCLEas a valueinputs of a line that reads its own answer, directly or round a loop of lines.
TRACE_FORWARD_REFERENCEas a valueinputs of a line that reads a line below it, whose order of working cannot be traced.

In the package as ERROR_CODE_CATALOGUES.MapReduceErrorCodes.

CodeArrivesWhen it arises
MAP_REDUCE_EXPECTED_COLLECTION_NAMEthrownA map over named collections (map(x + y, x = [1, 2], y = [3, 4])) with one that has no name before its =.
MAP_REDUCE_TRANSFORM_MUST_BE_SYNCHRONOUSthrownA map, reduce, sum or prod whose expression reaches live data, which it cannot wait for once per element.

In the package as ERROR_CODE_CATALOGUES.MathPhrasesErrorCodes.

CodeArrivesWhen it arises
AGGREGATE_CALL_EMPTYthrownAn aggregate call with nothing inside, as in mean(), refused rather than answered 0.
AGGREGATE_CALL_RANGEthrownAn aggregate call whose only argument is written like a range (average(1:3), mean(1:3), median(1:3)), which outside sum (and its synonym total), prod, map and reduce is a clock time.
AGGREGATE_NAME_RESERVEDthrownA function of the reader’s own defined under an aggregate’s name (mean, median, stdev), which a call would never reach.
CLAMP_EXPECTED_BETWEEN_OR_FROMthrownclamp <value> followed by neither between nor from.
REMAINDER_EXPECTED_DIVIDED_BYthrownremainder of <a> not followed by divided by or /.
ROOT_EXPECTED_OFthrownroot <n> not followed by of.
LOG_EXPECTED_BASEthrownlog <n> not followed by base.
PROPORTION_EXPECTED_WHATthrownA proportion (5 km is to 500 m as 5 cm is to what) missing its final what.
WEIGHTED_AVERAGE_MISSING_WEIGHTthrownA weighted average with a value that has no at <weight> after it.

In the package as ERROR_CODE_CATALOGUES.MatrixErrorCodes.

CodeArrivesWhen it arises
EMPTY_MATRIX_LITERALthrownA matrix written as [], which has no shape.
RAGGED_MATRIX_LITERALthrownA matrix whose rows have different numbers of columns. The message names the row.
INVALID_MATRIX_SLICE_ARITYthrownA matrix slice with other than two ranges, one for the rows and one for the columns.

In the package as ERROR_CODE_CATALOGUES.IpErrorCodes.

CodeArrivesWhen it arises
IP_EXPECTEDas a valueA networking form given something that is not an IP address or a subnet.
IP_NO_PREFIXas a valuehosts in or netmask of given an address with no prefix length, as in /24.
IP_NEEDS_ADDRESS_AND_PREFIXas a valuebroadcast of, network of or last address of given something without both an address and a prefix.
IP_EXPECTED_ADDRESSas a value<address> in <subnet> with no address on the left.
IP_EXPECTED_BLOCKas a value<address> in <subnet> with no subnet on the right.
IP_PREFIX_OUT_OF_RANGEas a valueA prefix no address has (netmask of /200, 2001:db8::/129): IPv4 prefixes run from 0 to 32 and IPv6 prefixes from 0 to 128.
IP_FAMILY_MISMATCHas a value<address> in <subnet> with an IPv4 address and an IPv6 subnet, or the other way round.
IPV6_NO_BROADCASTas a valuebroadcast of an IPv6 block: IPv6 has no broadcast address, and last address of gives the block’s last one.

In the package as ERROR_CODE_CATALOGUES.NumeralsErrorCodes.

CodeArrivesWhen it arises
NUMERAL_EXPECTED_NUMBERas a valueA numeral form (as roman, as words) given something that is not a number.
NUMERAL_OUT_OF_RANGEas a valueA number the numeral form cannot write: Roman numerals cover 1 to 3,999, and a number past the largest spelled one has no words.
NUMERAL_EXPECTED_TEXTas a valuefrom roman given something that is not text in quotes.
NUMERAL_INVALID_ROMANas a valuefrom roman given text that is not a valid Roman numeral.

In the package as ERROR_CODE_CATALOGUES.PayrollErrorCodes.

CodeArrivesWhen it arises
PAYROLL_EXPECTED_GBPas a valueThe banded forms were given something other than a pound salary.
PAYROLL_EXPECTED_RATEas a valueA stated tax rate was not a rate a take-home can be worked out from.
PAYROLL_UNKNOWN_LOAN_PLANeitherwith student loan with no plan, or a plan that does not exist (with plan 3 student loan).
PAYROLL_CONFLICTING_CASEeitherTwo places, two pensions, a plan named twice, or two undergraduate plans on one take-home line.
PAYROLL_EXPECTED_PENSION_RATEeitherwith 150% pension: a pension contribution that is not a percentage between 0 and 100.
PAYROLL_NEGATIVE_SALARYas a value-£50,000 after tax or hourly for -£50,000: a salary below zero, which no one is paid.

In the package as ERROR_CODE_CATALOGUES.PercentageErrorCodes.

CodeArrivesWhen it arises
IS_WHAT_EXPECTED_PERCENTthrown<a> is what not followed by % or percent.
IS_WHAT_EXPECTED_PREPOSITIONthrown<a> is <n>% not followed by of what, off what or on what.
IS_WHAT_EXPECTED_WORDthrownA percentage phrase missing one of its words part-way through. The message names the word.
PERCENT_CHANGE_EXPECTED_TOthrownpercent change from <a> not followed by to and the new value.

In the package as ERROR_CODE_CATALOGUES.GeoErrorCodes.

CodeArrivesWhen it arises
GEO_EXPECTED_PLACEas a valueA distance or bearing was given something that is not a place.
GEO_OUT_OF_RANGEas a valueA latitude or longitude was outside the globe.
GEO_BAD_ANGLEas a valueAn angle literal’s parts do not make an angle (75 minutes, say).
GEO_NOT_A_PLACEas a valueTwo lettered angles side by side were not one latitude and one longitude.
GEO_NO_BEARINGas a valueThe two places have no single direction between them.
GEO_EXPECTED_ANGLEas a valueas dms was given something that is not an angle or a place.
GEO_EXPECTED_SECOND_PLACEthrownA distance or bearing between places with no second place after its to or and.

In the package as ERROR_CODE_CATALOGUES.RandomErrorCodes.

CodeArrivesWhen it arises
RANDOM_EXPECTED_COUNTas a valuerandom hex given a count that is not a number of 0 or more.
RANDOM_PICK_EMPTYas a valuepick with no options to choose from.
RANDOM_SHUFFLE_EXPECTED_LISTas a valueshuffle given something that is not a single row or column.
RANDOM_SEED_EXPECTED_VALUEthrownrandom seed with nothing after it to seed with.

In the package as ERROR_CODE_CATALOGUES.RatioErrorCodes.

CodeArrivesWhen it arises
RATIO_EXPECTED_NUMBERSas a valueratio(...) given something that is not a whole number.
RATIO_INVALIDas a valueratio(...) given fewer than two whole positive numbers.

In the package as ERROR_CODE_CATALOGUES.WebErrorCodes.

CodeArrivesWhen it arises
WEB_EXPECTED_PIXELSas a valueA width or a height was not a whole count of pixels.
DENSITY_EXPECTED_NUMBERthrownat and dpi with a word rather than a number of dots per inch between them, as in 4000px at x dpi.
WEB_EXPECTED_PX_OR_REMas a valueA size measured against a root font size was in neither px nor rem.
WEB_EXPECTED_ROOT_SIZEas a valueThe stated root font size was not a size a rem can be measured against.
WEB_EXPECTED_PIXELS_OR_LENGTHas a valueA size measured against a density was neither a CSS length nor a physical length.
WEB_EXPECTED_DENSITYas a valueThe stated density was not a number of dots per inch above zero.

In the package as ERROR_CODE_CATALOGUES.ShoppingErrorCodes.

CodeArrivesWhen it arises
VS_INCOMPARABLEas a value<a> vs <b> between two amounts that are not the same kind of thing.

In the package as ERROR_CODE_CATALOGUES.StatisticsErrorCodes.

CodeArrivesWhen it arises
STAT_ARGUMENT_COUNTas a valueA statistics function given the wrong number of arguments. The message shows the call.
STAT_EXPECTED_LISTas a valueA statistic that reads a list given something else, or too short a list.
STAT_EXPECTED_LISTSas a valueA two-list statistic (correlation, slope) given something other than two lists.
STAT_LENGTH_MISMATCHas a valueA two-list statistic given lists of different lengths.
STAT_TOO_FEWas a valueA two-list statistic given fewer than two paired points.
STAT_EMPTYas a valueA statistic of an empty list.
STAT_EXPECTED_PERCENTas a valuepercentile given no percentage.
STAT_PERCENT_RANGEas a valuepercentile given a percentage outside 0 to 100.
STAT_EXPECTED_VALUEas a valueA distribution or zscore given something that is not a number where a number goes.
STAT_PROBABILITY_RANGEas a valueA distribution given a probability outside the range it takes.
STAT_NOT_WHOLEas a valueA distribution given a count that is not a whole number.
STAT_COUNT_RANGEas a valueA distribution given a count below zero, or more successes than trials.
STAT_SD_NOT_POSITIVEas a valueA normal distribution given a standard deviation of zero or less.
STAT_GAMMA_POLEas a valuegamma at zero or a negative whole number, where it is undefined.
STAT_OVERFLOWas a valueA distribution or gamma whose answer is beyond the largest number a double can hold.
STAT_NO_CONVERGENCEas a valueA distribution whose series did not settle on an accurate answer for arguments this large.

In the package as ERROR_CODE_CATALOGUES.StocksErrorCodes.

CodeArrivesWhen it arises
STOCKS_NOT_CONFIGUREDas a valueA stock price asked for on an engine whose stocks package was created without a provider. The host supplies one through createStocksPackage.
STOCKS_INVALID_TICKERthrownstock(...) given something that is not a ticker symbol.
STOCKS_EXPECTED_ONthrownA historical price field (close, open) not followed by on <date>.
STOCKS_EXPECTED_DATEthrownon not followed by a date the stocks package reads.
STOCKS_INVALID_DATEthrownA date after on that is not a real calendar date, or has no four-digit year.

In the package as ERROR_CODE_CATALOGUES.SymbolicErrorCodes.

CodeArrivesWhen it arises
SYMBOLIC_ARGUMENT_MUST_BE_SYNCHRONOUSthrownAn algebra verb (der, integral, solve) whose expression reaches live data.

In the package as ERROR_CODE_CATALOGUES.TablesErrorCodes.

CodeArrivesWhen it arises
TABLE_NO_DOCUMENTas a valueCross-line table reads need a real document, absent on the single-expression path.
TABLE_NOT_FOUNDas a valueNo markdown table was found above the query line.
TABLE_COLUMN_NOT_FOUNDas a valueThe named column is not one of the table’s headers.
TABLE_COLUMN_NO_NUMERIC_CELLSas a valueThe column held no number or money cells to aggregate.
TABLE_COLUMN_PERCENT_CELLas a valueA column summary met a percentage cell, which it does not add to or compare with the figures (#651).
TABLE_COLUMN_AMBIGUOUSeitherA lookup named a column the header carries more than once.
TABLE_ROW_NOT_FOUNDeitherNo row’s first cell carries the label an exact lookup asked for.
TABLE_ROW_AMBIGUOUSeitherMore than one row carries the label, so an exact lookup cannot choose.
TABLE_LOOKUP_KEY_INVALIDeitherAn exact lookup’s key was neither quoted text nor a plain number.
TABLE_CELL_EMPTYeitherThe looked-up cell is empty.
TABLE_CELL_NOT_A_VALUEeitherThe looked-up cell is text, not a number, an amount of money or a percentage.
TABLE_BANDS_MALFORMEDeitherThe table cannot be read as bands: a start that is not a number, starts out of order, a rate that cannot be read.
TABLE_BANDS_NOT_FROM_ZEROeitherA progressive total’s first band does not start at 0, so part of the amount falls in no band.
TABLE_BAND_BELOW_FIRSTeitherA band lookup’s amount is below where the first band starts.
TABLE_BAND_AMOUNT_INVALIDeitherThe amount placed in the bands is not a plain number or money, or is below zero for a progressive total.
TABLE_BAND_UNIT_MISMATCHeitherThe amount, the band starts and the rates name currencies that do not go together.
TABLE_COLUMN_NAME_EXPECTEDthrownA column form (sum of column, column ... for) not followed by a column name in quotes.
TABLE_LOOKUP_FOR_EXPECTEDthrownA table lookup not followed by for and a row, as in column "cost" for "food".

In the package as ERROR_CODE_CATALOGUES.TextExtractionErrorCodes.

CodeArrivesWhen it arises
TEXT_EXPECTEDas a valueA form was given something other than text where it reads text.
TEXT_ARGUMENT_COUNTas a valueA call form was given the wrong number of arguments.
TEXT_NO_NUMBERSas a valueThe text has no numbers for an aggregate to work on.
TEXT_NO_AMOUNTSas a valueThe text has no amounts of money for an aggregate to work on.
TEXT_TOO_MANY_NUMBERSas a valueThe text holds more numbers than one read allows.
TEXT_NO_MATCHas a valueThe pattern does not occur in the text.
TEXT_PATTERN_TOO_COSTLYas a valueMatching took more steps than one call allows.
TEXT_PATTERN_INVALIDeitherThe pattern is not well formed.
TEXT_PATTERN_UNSUPPORTEDeitherThe pattern uses a feature the matcher refuses.
TEXT_PATTERN_TOO_LARGEeitherThe pattern is past a size limit.
TEXT_NOT_JSONeitherfield was given text that is not JSON.
TEXT_FIELD_PATH_INVALIDeitherfield was given a malformed path.
TEXT_FIELD_NOT_FOUNDeitherThe path leads nowhere in the JSON.
TEXT_FIELD_NULLeitherThe field holds null.
TEXT_FIELD_INEXACT_NUMBEReitherThe field holds a whole number too large to read exactly.

In the package as ERROR_CODE_CATALOGUES.TimeFormErrorCodes.

CodeArrivesWhen it arises
TIME_ZONE_EXPECTED_CITYthrowntime in not followed by a city or a zone.
TIME_ZONE_EXPECTED_INthrownA time in one zone not followed by in <city> for the zone to convert to.
TIME_ZONE_EXPECTED_TARGETthrownin not followed by a city or a zone to convert to.
TIME_ZONE_UNKNOWNthrownA place named as a time zone that the engine does not know. The message says what it reads: a city, an abbreviation or an offset.
TIME_ZONE_TOO_MANYthrownOne line naming more time zones than a line takes.
TIME_ZONE_MISSING_DATEthrownon not followed by a date, in a time converted on a given day.
TIME_DIFFERENCE_EXPECTED_CITYthrowntime difference between not followed by a city or a zone.
TIME_DIFFERENCE_EXPECTED_SECOND_CITYthrowntime difference between <a> and not followed by a second city or zone.
OVERLAP_EXPECTED_HOURSthrownoverlap of not followed by hours, as in 9am to 5pm.
OVERLAP_EXPECTED_INthrownThe hours of an overlap not followed by in and the places.
OVERLAP_EXPECTED_CITYthrownin not followed by a city or a zone, in an overlap.
TIMECODE_EXPECTED_FPSthrownA video timecode or frame count without its frame rate, as in at 30 fps.
TIMECODE_EXPECTED_FRAMESthrownA timecode followed by in and something other than frames.
TIMECODE_FRAME_OUT_OF_RANGEthrownA timecode whose frame number is not below the frame rate.
TIME_IN_ZONE_UNDATEDthrowntime in Tokyo on 1 March 2027: the time in a place is the time there now, not on another day. The message points at converting a time on that day instead.
ISO_DURATION_MALFORMEDeitherAn identifier shaped like an ISO 8601 duration that breaks its grammar, as P1H (a time part before the T) or P1D1D. The message says which rule it breaks.

In the package as ERROR_CODE_CATALOGUES.TimezoneErrorCodes.

CodeArrivesWhen it arises
TIME_ZONE_SKIPPED_TIMEas a value1:30am London on 29 March 2026 in Tokyo: the clocks went forward over 1:30, so it never happened in London that day.
TIME_ZONE_REPEATED_TIMEas a value1:30am London on 25 October 2026 in Tokyo: the clocks went back over 1:30, so it happened twice and names no one moment.
TIME_ZONE_EXPECTED_DATEas a value3pm London on 5 in Tokyo, or 3pm on 5: the on clause was given something that is not a date.
TIME_ZONE_EXPECTED_TIMEas a valuet London in Tokyo where t holds something that is not a time (t = 5): a zone after a name converts the time of day it holds.
OVERLAP_NEEDS_TWO_ZONESas a valueoverlap of 9am to 5pm in London: one place has nothing to overlap with.
OVERLAP_HOURS_EMPTYas a valueoverlap of 9am to 9am in London and Paris: hours that start where they end have no length.

In the package as ERROR_CODE_CATALOGUES.TravelErrorCodes.

CodeArrivesWhen it arises
TRIP_EXPECTED_DISTANCEas a valueThe first quantity was not a distance.
TRIP_EXPECTED_ECONOMYas a valueThe second quantity was not a fuel economy.
TRIP_EXPECTED_FUEL_PRICEas a valueThe price was not an amount of money for a volume.

In the package as ERROR_CODE_CATALOGUES.UomErrorCodes.

CodeArrivesWhen it arises
COOKING_CONVERSION_REQUIRES_UNITas a valueA cooking conversion of a plain number, with no mass or volume unit.
COOKING_CONVERSION_UNSUPPORTED_UNITas a valueA cooking conversion from or to a unit that is not a mass or a volume.
COOKING_UNKNOWN_INGREDIENTas a valueA cooking conversion between mass and volume for an ingredient with no density in the table.

In the package as ERROR_CODE_CATALOGUES.VariablesErrorCodes.

CodeArrivesWhen it arises
EXPECTED_IDENTIFIERthrownA : or global : not followed by a name, as in := 5.
NAME_HAS_RESERVED_WORDthrownA name of several words holding a word the engine already reads: an operator spelled as a word, first or last (take home = 5, monthly take = 4000), or a phrase (tax on = 5). The message names the word.
NAME_HAS_QUOTE_MARKthrownA name of several words with a quote mark that is not an apostrophe in a word (Alice‘s food = 3), or an apostrophe before a word’s first letter (’tis rate = 5). The message names the mark.

In the package as ERROR_CODE_CATALOGUES.WeatherErrorCodes.

CodeArrivesWhen it arises
WEATHER_GEOCODING_API_ERRORthrownOpen-Meteo’s geocoding endpoint returned a non-OK HTTP status.
WEATHER_CITY_NOT_FOUNDthrownGeocoding succeeded (200 OK) but matched no place for the given name, most likely a typo in the city, not an API failure.
WEATHER_FORECAST_API_ERRORthrownOpen-Meteo’s forecast endpoint returned a non-OK HTTP status.
WEATHER_FORECAST_RESPONSE_MALFORMEDthrownForecast endpoint returned 200 OK but the response body is missing the expected current/daily blocks, an API contract violation, not a local bug.
WEATHER_UNKNOWN_QUERY_KINDthrownWeatherPackage.ts’s fetchQuery switch fell through to its default case, unreachable via this package’s own parselets, an internal invariant violation if it ever happens.
WEATHER_EXPECTED_CITYthrownA weather form (weather in, temperature in) not followed by a city.

In the package as ERROR_CODE_CATALOGUES.WhatIfErrorCodes.

CodeArrivesWhen it arises
WHAT_IF_NO_DOCUMENTas a valueA what-if or a sweep evaluated with no document to re-run.
WHAT_IF_TARGETS_ITSELFas a valueA what-if or a sweep naming its own line, which it would re-run.
WHAT_IF_REQUIRES_VARIABLE_NAMEthrownA what-if with no name to change after with.
WHAT_IF_DUPLICATE_INPUTthrownA what-if that sets the same name twice.
WHAT_IF_TOO_MANY_INPUTSthrownA what-if changing more inputs than one takes.
WHAT_IF_INPUT_PENDINGas a valueA what-if whose input is still waiting on live data.
SWEEP_REQUIRES_VARIABLE_NAMEthrownA sweep with no name to step through after for.
SWEEP_REQUIRES_STEPthrownA sweep with no step after its range.
SWEEP_RANGE_NOT_NUMERICas a valueA sweep whose start, end or step is not a finite number, percentage or quantity.
SWEEP_RANGE_MISMATCHas a valueA sweep whose start, end and step are not all the same kind of value.
SWEEP_STEP_ZEROas a valueA sweep with a step of zero, which never reaches its end.
SWEEP_STEP_WRONG_SIGNas a valueA sweep whose step moves away from its end.
SWEEP_TOO_MANY_STEPSas a valueA sweep that would try more values than one sweep allows.
SWEEP_TOO_MUCH_WORKas a valueA sweep that would re-run more lines in all than one sweep allows.
SWEEP_OVER_BUDGETas a valueA sweep whose steps together reached a limit on the work one evaluation may do.
SWEEP_STEP_FAILEDas a valueA sweep one of whose steps failed. The message names the input value and the failure.
SWEEP_ANSWER_NOT_NUMERICas a valueA sweep one of whose answers is not a number or a quantity, which is all a sweep lists.
SWEEP_ANSWER_PERCENTAGEas a valueA sweep of a line that answers a percentage, which a list (a row of plain numbers) cannot hold.
SWEEP_DATE_STEP_NOT_DURATIONas a valueA sweep between two dates whose step is not a length of time (step 5), or is working days.
SCENARIO_UNKNOWNas a valueline N under bull with no scenario bull with ... line above it.
SCENARIO_DUPLICATEas a valueline N under bull where two lines above both declare a scenario named bull.