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.codeon theEngineErrorthatevaluateExpressionorevaluateLinethrows, for a line the engine cannot read or run at all;value.errorCodeon the error value a line returns, for a line the engine ran but could not answer;errorCodeon a document line or inline solve fromparseDocumentorevaluateDocument, for a line that threw, beside itserrormessage, and on the error value in itsresultfor 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"); // trueisCataloguedErrorCode("CRYPTO_QUERY_FAILED"); // true: a run-time patternisCataloguedErrorCode("NOT_A_CODE"); // falseA 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.
The engine
Section titled “The engine”CoreErrorCodes
Section titled “CoreErrorCodes”In the package as ERROR_CODE_CATALOGUES.CoreErrorCodes.
Parser
| Code | Arrives | When it arises |
|---|---|---|
INVALID_NUMBER_LITERAL | thrown | A 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_STRING | thrown | A " that is never closed, as in "abc. Raised by the lexer; the reader closes the text. |
DIRECTION_CONTROL_IN_NAME | thrown | A 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_PARSELET | thrown | A 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_INPUT | thrown | A 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_TYPE | thrown | A 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_EXCEEDED | thrown | Brackets, 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_END | thrown | The same as UNEXPECTED_END_OF_INPUT, raised where a line ends before an expression starts at all. |
UNEXPECTED_TRAILING_TOKEN | thrown | A 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_ERROR | either | The generic parse failure, kept for a caller that wraps one without a more specific code. |
TOO_MANY_NUMERIC_CONSTANTS | thrown | One line with more distinct number literals than a compiled program can index. A safety limit; the reader splits the line. |
BYTECODE_OPERAND_OUT_OF_RANGE | thrown | A 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_CONSTANTS | thrown | One line with more distinct text literals than a compiled program can index. A safety limit; the reader splits the line. |
NO_MATCHING_PHRASE_ALTERNATIVE | thrown | A 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_PATTERN | thrown | A package declared a phrase pattern whose alternative does not begin with a keyword. An authoring fault, raised when the pattern is built. |
PHRASE_KEYWORD_MISMATCH | thrown | A 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_NAME | thrown | A function definition (f(x, y) = ...) with something other than a name where a parameter goes. |
USER_FUNCTION_NO_PARAMS | thrown | A function definition with no parameters, f() = ..., which would read the same as a call. A definition needs at least one. |
FUNCTION_BODY_MUST_BE_SYNCHRONOUS | thrown | A 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_LINES | thrown | A 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_LINES | thrown | A 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_DEFINITIONS | thrown | One 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_BODIES | thrown | One 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_FUNCTION | either | A 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_FAILED | as a value | A plugin function’s promise was rejected. The line reports the rejection’s message rather than waiting again. |
PLUGIN_RESULT_NOT_A_VALUE | as a value | A plugin function’s promise resolved to something that is not a Value. An authoring fault, reported on the line. |
VM
| Code | Arrives | When it arises |
|---|---|---|
EVALUATION_ERROR | thrown | A line failed and no more specific code was kept for it. A fallback; the message says what happened. |
INSTRUCTION_LIMIT_EXCEEDED | thrown | One 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_EXCEEDED | thrown | One evaluation grew the VM stack past vm.maxStackDepth. A safety limit; the reader simplifies the line. |
ALLOCATION_LIMIT_EXCEEDED | thrown | One 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_UNDERFLOW | thrown | The 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_VARIABLE | thrown | A 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_RESOLVED | thrown | A global :name read before its value arrived from the shared store. It resolves on a later evaluation. |
UNKNOWN_FUNCTION | thrown | A 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_RESULT | thrown | A 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_FUNCTION | either | A call to a function of the reader’s own that no line defines, or a definition the VM could not complete. |
FUNCTION_ARITY_MISMATCH | either | A function of the reader’s own called with a different number of arguments than it was defined with. |
BUILTIN_ARITY_MISMATCH | thrown | A 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_UNSUPPORTED | thrown | A function of the reader’s own whose body reaches live data (weather, stocks, a currency rate). Function bodies must be synchronous. |
MAP_REDUCE_ASYNC_UNSUPPORTED | thrown | A 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_UNSUPPORTED | thrown | An 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_UNSUPPORTED | thrown | explainLine() 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_DOCUMENT | thrown | traceLine() 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_LINE | thrown | traceLine() asked for a line number the document does not have (below 1, past the last line, or not a whole number). |
FUNCTION_RECURSION_LIMIT_EXCEEDED | thrown | A 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_EXCEEDED | thrown | One 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_EXCEEDED | thrown | A <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_DATE | as a value | N working days after <x> (or before, from) where <x> is not a date, as in 5 working days after 3. |
WORKDAYS_BETWEEN_EXPECTED_DATES | as a value | working days between <a> and <b> where one end is not a date. |
WORKDAYS_BETWEEN_RANGE_TOO_LARGE | as a value | working days between two dates further apart than date.maxOffsetYears and date.minOffsetYears allow the count to walk. |
BIGINT_SHIFT_LIMIT_EXCEEDED | thrown | A << 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_EXCEEDED | thrown | A ^ 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_OPERAND | thrown | A value with no whole-number form (a fraction, an infinity) meeting a big integer: 1n + 0.5, 5n / pi. |
BIGINT_DIVISION_BY_ZERO | thrown | 10n / 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_FINITE | as a value | An 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_BODY | thrown | A compiled program naming a function body it does not carry. A compiler or VM fault, worth reporting. |
INTERNAL_MISSING_ANONYMOUS_BODY | thrown | A compiled program naming a map or reduce body it does not carry. A compiler or VM fault, worth reporting. |
UNKNOWN_BUILTIN_FUNCTION | as a value | A 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
| Code | Arrives | When it arises |
|---|---|---|
MALFORMED_BYTECODE_TRUNCATED | either | An operand byte read past the end of the stream: the program ends in the middle of an instruction. |
MALFORMED_BYTECODE_CONSTANT_INDEX | either | A constant-pool operand indexing a numbers/strings entry that does not exist, or that is not of the pool’s type. |
MALFORMED_BYTECODE_OPERAND_TYPE | either | A 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_KIND | either | A map or reduce instruction carrying a body kind other than 0, 1 or 2. |
MALFORMED_BYTECODE_BIGINT_LITERAL | either | A big-integer constant in the program that is not a whole number, such as "1.000". |
MALFORMED_BYTECODE_PROGRAM | thrown | executeBytecode called with something that is not a runnable program at all. |
MALFORMED_BYTECODE_UNKNOWN_OPCODE | either | An instruction the VM does not have, refused at the offset that carries it (in the error’s context). |
Symbolic algebra
| Code | Arrives | When it arises |
|---|---|---|
SYMBOLIC_RATIONAL_OVERFLOW | thrown | A coefficient grew past RATIONAL_MAX_BITS, e.g. repeated exact elimination multiplying denominators together. |
SYMBOLIC_NONFINITE_OPERAND | either | NaN or ±Infinity reaching a symbolic expression, neither of which has an exact rational value. |
SYMBOLIC_DIVISION_BY_ZERO | either | An 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_OPERAND | as a value | Arithmetic 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_EXCEEDED | thrown | A tree exceeding SYMBOLIC_MAX_NODES entering the simplifier. |
SYMBOLIC_FORMULA_VALUE_UNSUPPORTED | as a value | A 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_FUNCTION | as a value | A 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_EXCEEDED | thrown | factor 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_UNSUPPORTED | as a value | An 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_INCOMPLETE | as a value | Some 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_FOUND | as a value | A 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_ROOTS | as a value | A 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_INVALID | as a value | A 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_BOUNDS | thrown | integral(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_POINT | thrown | limit(f, x) with no point for the unknown to approach. |
SYMBOLIC_INTEGRAL_IMPROPER | as a value | A 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_UNSETTLED | as a value | A 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_DIVERGES | as a value | A limit where the expression grows without bound (1/x^2 at 0). |
SYMBOLIC_LIMIT_SIDES_DISAGREE | as a value | A limit whose left and right sides settle on different values (abs(x)/x at 0). The message names both. |
SYMBOLIC_LIMIT_UNSETTLED | as a value | A limit whose values never settle on one number (sin(1/x) at 0). |
SYMBOLIC_LIMIT_UNDEFINED | as a value | A limit of an expression with no real value near the point on either side. |
SYMBOLIC_LIMIT_UNSUPPORTED | as a value | A 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_NAME | either | solve’s second argument not being a bare name. |
SYMBOLIC_DERIVATIVE_ORDER_LIMIT | thrown | A derivative order outside 0..DERIVATIVE_MAX_ORDER. |
SYMBOLIC_INTEGRAL_UNSUPPORTED | as a value | An 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_LIMIT | thrown | A Taylor degree outside 0..TAYLOR_MAX_DEGREE. |
SYMBOLIC_TAYLOR_INEXACT | thrown | A Taylor coefficient that does not reduce to an exact number at the expansion point. |
SYMBOLIC_REQUIRES_VARIABLE_NAME | either | An algebra verb’s variable-name argument not being a bare name. |
SYMBOLIC_JACOBIAN_NO_VARIABLES | as a value | jacobian called with expressions containing no unknown to differentiate against. |
INTERNAL_RATIONAL_PARSE | thrown | A finite number whose decimal form could not be read back, which the regex covering every Number.prototype.toString output should make unreachable. |
Engine
| Code | Arrives | When it arises |
|---|---|---|
EXPRESSION_TOO_LONG | thrown | A line longer than validation.maxExpressionLength characters. Refused before it is read; the host may raise the limit. |
EXPRESSION_TOO_COMPLEX | thrown | A line whose complexity score passes validation.maxComplexity. Refused before it is read; the host may raise the limit. |
DOCUMENT_TOO_LARGE | thrown | A 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_EXCEEDED | thrown | The normaliser grew a line’s tokens past its safety limit. A guard against a rule that expands without end. |
NORMALIZER_PASS_LIMIT_EXCEEDED | thrown | The 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_EXPRESSION | thrown | "=>" with nothing before it, needs an expression or variable name to solve/simplify. |
THEREFORE_ASYNC_UNSUPPORTED | thrown | A "=>"-triggered expression called an async plugin (weather/stocks/currency). Same v1 scope restriction as user-function/map-reduce bodies. |
COMPOUND_ASSIGN_REQUIRES_EXPRESSION | thrown | A compound assignment (name += expr / name -= expr) with nothing on the right, a line half-typed on the way to total += 5. |
COMPOUND_ASSIGN_ASYNC_UNSUPPORTED | thrown | A 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_PERIOD | thrown | A 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_LITERAL | thrown | Colon-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_UNSUPPORTED | either | A 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_NAME | either | Text 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_DIGITS | either | A 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_NUMBER | either | A 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_DISABLED | as a value | A 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
| Code | Arrives | When it arises |
|---|---|---|
WHAT_IF_OVERRIDE_INVALID | thrown | engine.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_USED | either | A 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_GLOBAL | either | A 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
| Code | Arrives | When it arises |
|---|---|---|
FROZEN_VALUE_MISSING | as a value | A 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_UNSUPPORTED | thrown | frozen 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_EXPECTED | thrown | frozen 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
| Code | Arrives | When it arises |
|---|---|---|
TEMPORAL_IMPLEMENTATION_INVALID | thrown | createTemporalCalendar() 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_UNKNOWN | thrown | The 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
| Code | Arrives | When it arises |
|---|---|---|
DATE_CLOCK_INVALID | thrown | The 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
| Code | Arrives | When it arises |
|---|---|---|
SNAPSHOT_VERSION_MISMATCH | thrown | fromJSON() 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_MALFORMED | thrown | A 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_VALUE | thrown | A 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_MISSING | thrown | A 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
| Code | Arrives | When it arises |
|---|---|---|
CONFIG_PATH_NOT_FOUND | thrown | A configuration read or write named a path that does not exist. A host configuration fault. |
INVALID_CONFIG_PATH | thrown | A configuration path not in the section.property form. A host configuration fault. |
CONFIG_SECTION_NOT_FOUND | thrown | A configuration path whose section does not exist. A host configuration fault. |
CONFIG_PROPERTY_NOT_FOUND | thrown | A configuration path whose property does not exist in its section. A host configuration fault. |
Forms and settings without a catalogue of their own
| Code | Arrives | When it arises |
|---|---|---|
CALENDAR_TEMPORAL_UNAVAILABLE | thrown | calendar: "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_AT | thrown | A trip form (cost to drive ...) was written without the at that separates its parts. Recoverable. |
DIMENSIONS_EXPECTED_FORM | thrown | A width and a height were written with nothing asked of the pair (1920x1080 on its own). Recoverable. |
RESIZE_EXPECTED_SHAPE | thrown | A resize was written without one of its parts: the dimensions, the to, the size, or the side it names. Recoverable. |
Registering a package
| Code | Arrives | When it arises |
|---|---|---|
PLUGIN_OPERATOR_COLLISION | thrown | A package registered an operator the engine already has. Refused at registration, since a built-in operator cannot be overridden. |
PLUGIN_OPERATOR_UNSUPPORTED | thrown | A 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_COLLISION | thrown | A package registered a keyword the engine already has. Refused at registration, since a built-in keyword cannot be overridden. |
PLUGIN_CALL_FUSION_UNREACHABLE | thrown | A 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_UNREACHABLE | thrown | A 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_UNKNOWN | thrown | A 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_COLLISION | thrown | A package registered a unit spelling the engine already has. Refused at registration, since a built-in unit cannot be overridden. |
PACKAGE_ENGINE_VERSION_MISMATCH | thrown | A package’s declared IEnginePackage.engineVersion semver range doesn’t satisfy the running engine’s ENGINE_VERSION. See api/EngineVersionCompatibility.ts. |
PACKAGE_ENGINE_VERSION_INVALID_RANGE | thrown | A package’s declared IEnginePackage.engineVersion isn’t a parseable semver range at all (a typo in the package’s own descriptor). |
PACKAGE_NAME_MISSING | thrown | A 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_MISSING | thrown | A 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_EXHAUSTED | thrown | More packages asked for opcodes of their own than the dynamic opcode range holds. A registration fault. |
PLUGIN_FUNCTION_INDEX_POOL_EXHAUSTED | thrown | More plugin functions registered than a compiled call can index (65,536). A registration fault. |
PLUGIN_FUNCTION_INDEX_TOO_LARGE | thrown | A 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
| Code | Arrives | When it arises |
|---|---|---|
INVALID_RATE_UNIT | either | A 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_UNIT | thrown | A timecode unit read from a string that is not one. A caller-contract fault inside the engine or a package. |
Exact decimals
| Code | Arrives | When it arises |
|---|---|---|
INVALID_DECIMAL_LITERAL | thrown | Text read as an exact decimal that is not one. Raised while a number literal is compiled; the reader fixes the digits. |
DECIMAL_DIVISION_BY_ZERO | thrown | An 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_SCALE | thrown | An exact decimal built with a negative or fractional scale. An engine invariant, worth reporting. |
DECIMAL_NEGATIVE_POWER | thrown | A power of ten asked for with a negative exponent inside the decimal layer. An engine invariant, worth reporting. |
Units and quantities
| Code | Arrives | When it arises |
|---|---|---|
INCOMPATIBLE_UNITS | as a value | Two 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_UNIT | as a value | A 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_UNIT | as a value | A 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_EXPONENT | as a value | An exponent carrying a unit, as in 2^(3 m). The message shows where the unit goes instead. |
UNIT_POWER_UNSUPPORTED | either | A 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_UNSUPPORTED | as a value | A square or cube root of a quantity whose root has no unit, as in sqrt(4 m), or of a negative area. |
UNIT_PRODUCT_UNSUPPORTED | as a value | Two quantities multiplied into something that is not a unit, as in $5 * $3. Lengths multiply into an area or a volume. |
UNIT_QUOTIENT_UNSUPPORTED | as a value | Two quantities divided into something that is not a unit: nothing cancels and the result would be a rate of a rate. |
UNIT_RECIPROCAL_UNSUPPORTED | as a value | A number divided by a quantity with no reciprocal unit, such as a temperature. |
CONVERT_NON_NUMERIC | as a value | Something with no single amount (a list, text, a date) converted to a unit. |
QUANTITY_NON_NUMERIC | as a value | Something with no single amount combined with a quantity, as in a list plus 5 m. |
CONSTANT_UNIT_UNSUPPORTED | as a value | A physical constant whose unit the engine cannot spell yet, converted or combined with a quantity. The constant stays a plain number. |
CURRENCY_RATE_UNAVAILABLE | as a value | A 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_UNIT | as a value | A rate built with / whose right-hand side has no unit to be per. |
RATE_MUL_LEFT_NOT_A_RATE | as a value | A rate multiplication whose left-hand side is not a rate. |
RATE_MUL_RIGHT_MISSING_UNIT | as a value | A rate multiplied by a value with no unit matching what the rate is per. |
RATE_MUL_MEASURE_MISMATCH | as a value | A rate multiplied by a quantity that measures something else than what the rate is per ($50/week * 3 kg). |
RATE_CONVERT_NOT_A_RATE | as a value | A conversion of a rate’s denominator applied to a value that is not a rate. |
RATE_CONVERT_MEASURE_MISMATCH | as a value | A rate’s denominator converted to a unit that measures something else ($50/week in kg). |
UNCERTAINTY_WITHOUT_UNIT | as a value | A 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_MISMATCH | as a value | A tolerance whose unit does not measure what its value does, or that has no rate to reach the value’s currency. |
Arithmetic and functions
| Code | Arrives | When it arises |
|---|---|---|
TEXT_ARITHMETIC | as a value | Text 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_COMPARISON | as a value | Text 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_ARITHMETIC | as a value | A 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_ARITHMETIC | as a value | An 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_NUMBER | as a value | as number or int given text that is not a number. |
REMAINDER_UNDEFINED | as a value | A remainder with no value: 5 mod 0, or the remainder of an infinite number. |
QUOTIENT_UNDEFINED | as a value | A 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_VALUE | as a value | A 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_DOMAIN | as a value | A function called outside the numbers it is defined for, such as ln(0). The message names the domain. |
FUNCTION_TAKES_NUMBER | as a value | A function that takes plain numbers given a quantity, as in sin(1 m), or a mix of numbers and quantities. |
TRIG_UNDEFINED | as a value | tan at an odd multiple of a right angle, where the tangent has no value. |
NOT_WHOLE_NUMBER | as a value | A function that counts whole things (fact, nPr) given a fraction. |
INVALID_FACTORIAL_INPUT | as a value | A factorial of a negative number or a fraction. |
FACTORIAL_OVERFLOW | as a value | A factorial past 170!, the largest a double can hold. |
PERMUTATION_OVERFLOW | as a value | A permutation count past the largest number a double can hold. |
COMBINATION_OVERFLOW | as a value | A combination count past the largest number a double can hold. |
INVALID_RANGE | as a value | A 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_OPERAND | as a value | gcd or lcm given a number with no whole value (an infinity, or nothing). |
NUMBER_THEORY_EXPECTED_INTEGER | as a value | A number theory function (factor, isprime, modpow) given something that is not a whole number. |
NUMBER_THEORY_DOMAIN | as a value | A 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_INVERSE | as a value | modinv of a number that shares a factor with the modulus, so no inverse exists. |
FACTOR_TOO_LARGE | as a value | factor of a whole number past 2^64, which is refused rather than left to run. |
PROPORTION_DIVIDE_BY_ZERO | as a value | proportion whose first term is zero, so there is nothing to scale by. |
WEIGHTED_AVERAGE_ZERO_WEIGHT | as a value | A weighted average whose weights add up to zero. |
STATISTIC_NOT_FINITE | as a value | A standard deviation or variance of a list holding an infinity. |
AGGREGATE_NON_NUMERIC | as a value | A 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_MIXED | as a value | An 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_QUANTITY | as a value | A value written as a percentage that is not a proportion, such as a length. |
PERCENTAGE_NOT_FINITE | as a value | A 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_OVERFLOW | as a value | A 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_ZERO | as a value | A percentage change from zero, which no percentage reaches. The message suggests the difference instead. |
PERCENT_CHANGE_NEGATIVE_BASE | as a value | A percentage change from a negative base, which has two readings. The message shows how to write the one meant. |
PERCENT_CHANGE_FAILED | as a value | A percentage change that could not be worked out from its two values. |
INVALID_RATE | as a value | A rate of interest or inflation that cannot be used: not a percentage, not finite, or at or below -100%. |
INVALID_TERM | as a value | A loan or savings term that is not a length of time. |
INFLATION_YEAR_OUT_OF_RANGE | as a value | An inflation adjustment for a year outside the bundled price index. |
INVALID_DATETIME_OP | as a value | A 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_MISMATCH | as a value | Two video timecodes at different frame rates added or subtracted. |
UNKNOWN_AS_CONVERTER | as a value | as <name> naming no converter any package registered. |
FLOAT_TAKES_NUMBER | as a value | float("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_NUMBER | as 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_CASE | as a value | as 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_CASE | as a value | as 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_RANGE | as a value | A plot’s range whose ends are not finite numbers. |
Lists, ranges and matrices
| Code | Arrives | When it arises |
|---|---|---|
INVALID_RANGE_BOUND | as a value | A range (0:3) whose bounds are not plain numbers. |
NON_INTEGER_RANGE_BOUND | as a value | A range whose bounds are not whole numbers (0.5:3). |
DESCENDING_RANGE | as a value | A 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_MALFORMED | thrown | A 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_ARGUMENT | either | A 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_NUMERIC | as a value | A 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_UNSUPPORTED | as a value | A 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_UNSUPPORTED | as a value | A 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_UNSUPPORTED | as a value | A 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_UNSUPPORTED | as a value | A 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_UNSUPPORTED | as a value | A 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_LARGE | as a value | A list or range with more elements than vm.maxCollectionSize allows. A safety limit; the host may raise it. |
MATRIX_CELL_NON_NUMERIC | as a value | A list cell that is not a number or a quantity: a list inside a list, text, a date. |
MATRIX_CELL_UNITS_DIFFER | as a value | A 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_UNIT | as a value | A 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_UNSUPPORTED | as a value | A 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_ALGEBRA | as a value | Matrix 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_MISMATCH | as a value | Two 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_MATRIX | as a value | [...] indexing or slicing applied to something that is not a matrix. |
MATRIX_INDEX_OUT_OF_BOUNDS | as a value | An index or a slice past the edge of the matrix. |
INVALID_MATRIX_SLICE_BOUND | as a value | A matrix slice whose bounds are not ranges. |
DETERMINANT_REQUIRES_SQUARE_MATRIX | as a value | det of a matrix that is not square. |
INVERSE_REQUIRES_SQUARE_MATRIX | as a value | inv of a matrix that is not square. |
SINGULAR_MATRIX | as a value | inv of a matrix with no inverse: a zero, or nearly zero, pivot. |
MATRIX_POWER_REQUIRES_SQUARE_MATRIX | as a value | A matrix raised to a power that is not square. |
MATRIX_POWER_REQUIRES_WHOLE_EXPONENT | as a value | A 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_UNSUPPORTED | as a value | A matrix used as an exponent, or ^ between a matrix and something with no matrix reading. |
SYMBOLIC_INVERSE_DIMENSION_LIMIT | as a value | A symbolic matrix inverse larger than the size the symbolic elimination handles. |
SYMBOLIC_SINGULAR_OR_UNSUPPORTED_PIVOT | as a value | A symbolic matrix inverse that meets a zero pivot, which the elimination does not reorder around. |
MAP_REDUCE_REQUIRES_COLLECTION | as a value | map, 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_MISMATCH | as a value | map over several lists of different lengths. |
REDUCE_EMPTY_COLLECTION | as a value | reduce over an empty list with no starting value. |
Reading other lines
| Code | Arrives | When it arises |
|---|---|---|
LINE_REF_NO_DOCUMENT | as a value | A 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_EVALUATED | as a value | A reference to a line below the one reading it, or past the end of the document, which has no answer yet. |
LINE_RESULT_ERROR | as a value | A reference to a line whose own answer is an error. The referenced line is the one to fix. |
LINE_RESULT_PENDING | as a value | A reference to a line still waiting on live data. It resolves when the data arrives. |
LINE_FAILED | either | A 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
| Code | Arrives | When it arises |
|---|---|---|
EQUATION_FACTOR_UNDEFINED | as a value | A matrix equation (A * x = b) naming a factor no line defines yet. |
EQUATION_FACTOR_NOT_MATRIX | as a value | A matrix equation whose factor is not a matrix. |
EQUATION_RHS_NOT_MATRIX | as a value | A matrix equation whose right-hand side is not a matrix. |
EQUATION_SEVERAL_UNKNOWNS | thrown | An 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
| Code | Arrives | When it arises |
|---|---|---|
GOAL_SEEK_NO_DOCUMENT | as a value | Goal 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_NESTED | as a value | Goal 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_READY | as a value | Goal seek targeting a line with no evaluated expression: below it, past the end, or prose. |
GOAL_SEEK_TARGET_IS_DEFINITION | as a value | Goal 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_UNSUPPORTED | as a value | Goal seek targeting a line that depends on live data, which a re-run cannot fetch. |
GOAL_SEEK_TARGET_ERROR | as a value | Goal 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
| Code | Arrives | When it arises |
|---|---|---|
WHAT_IF_LINE_OUT_OF_RANGE | as a value | A what-if or a sweep naming a line the document does not have. |
WHAT_IF_NESTED | as a value | A what-if or a sweep run from inside another one’s re-run of the document. |
WHAT_IF_IN_GOAL_SEEK | as a value | Goal seek targeting a line that holds a what-if or a sweep, whose every probe would re-run the document again. |
WHAT_IF_TARGET_ERROR | as a value | A what-if whose target line has no answer with the inputs given. The message is the line’s own. |
WHAT_IF_TARGET_NOT_A_CALCULATION | as a value | A what-if targeting prose, a heading or a blank line, which has no answer to work out again. |
WHAT_IF_TARGET_HAS_SEVERAL_ANSWERS | as a value | A what-if targeting a line with several inline answers, so there is no one answer to give. |
WHAT_IF_LIVE_DATA | as a value | A what-if targeting a line that waits on live data, which a re-run does not fetch. |
Live data
| Code | Arrives | When it arises |
|---|---|---|
ASYNC_RESOLVER_FAILED | as a value | A live value that failed to fetch several times in a row, reported rather than retried again. Editing the line tries again. |
SETTLE_TIMEOUT | thrown | await 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_INVALID | thrown | engine.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
| Code | Arrives | When it arises |
|---|---|---|
PASS_WORK_BUDGET_EXCEEDED | as a value | A 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_EXCEEDED | as a value | A 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
| Code | Arrives | When it arises |
|---|---|---|
UNEXPECTED_ERROR | thrown | Something other than an EngineError was thrown and normalised. Worth reporting: it is an engine or package fault rather than the reader’s line. |
UNKNOWN_ERROR | thrown | A thrown value that was not an Error at all, normalised. Worth reporting, as UNEXPECTED_ERROR is. |
DatetimeZoneErrorCodes
Section titled “DatetimeZoneErrorCodes”In the package as ERROR_CODE_CATALOGUES.DatetimeZoneErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
TIME_ZONE_OFFSET_OUT_OF_RANGE | either | 2026-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_UNKNOWN | as a value | A 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_CONVERTIBLE | as a value | A 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_UNKNOWN | thrown | dateCalendarInZone given a zone this runtime cannot compute in, as in "Europe/Atlantis". Raised when the host builds the calendar, not per line. |
DATE_WEEKDAY_INVALID | thrown | date: { 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). |
CurrencyErrorCodes
Section titled “CurrencyErrorCodes”In the package as ERROR_CODE_CATALOGUES.CurrencyErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
CURRENCY_API_ERROR | thrown | Frankfurter’s rates endpoint returned a non-OK HTTP status. |
UNKNOWN_CURRENCY_CODE | thrown | A requested currency/crypto code isn’t in the fetched rate table, an unrecognized code, not an API failure. |
CRYPTO_PRICE_API_ERROR | thrown | CoinGecko’s simple-price endpoint returned a non-OK HTTP status. |
HistoricalCurrencyErrorCodes
Section titled “HistoricalCurrencyErrorCodes”In the package as ERROR_CODE_CATALOGUES.HistoricalCurrencyErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
HISTORICAL_RATES_NOT_CONFIGURED | as a value | The 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_FAILED | either | The 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_RANGE | thrown | A 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_CURRENCY | thrown | A 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_PREFLIGHTED | as a value | The VM reached the conversion before preflight cached its rate, a “shouldn’t happen” invariant break, not a user error. |
HISTORICAL_CURRENCY_INVALID_OPERAND | as a value | The amount being converted was not a currency Value (bad bytecode, or a non-currency left operand). |
QueryResolverErrorCodePatterns
Section titled “QueryResolverErrorCodePatterns”In the package as ERROR_CODE_CATALOGUES.QueryResolverErrorCodePatterns.
| Code | Arrives | When it arises |
|---|---|---|
<NAMESPACE>_QUERY_FAILED | as a value | A 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_PREFLIGHTED | as a value | A live value read before its fetch was started, which the engine’s preflight makes unreachable. Worth reporting if a host sees it. |
SnapshotErrorCodes
Section titled “SnapshotErrorCodes”In the package as ERROR_CODE_CATALOGUES.SnapshotErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
SNAPSHOT_VERSION_MISMATCH | thrown | The object handed to fromJSON is not a snapshot at all, or its version does not match this engine’s reader. |
SNAPSHOT_MALFORMED | thrown | A snapshot with the right envelope but internally inconsistent contents (a bad number sentinel, a missing field). |
SNAPSHOT_UNSUPPORTED_VALUE | thrown | A 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_MISSING | thrown | The 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). |
DefineFunctionErrorCodes
Section titled “DefineFunctionErrorCodes”In the package as ERROR_CODE_CATALOGUES.DefineFunctionErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
DEFINE_FUNCTION_INVALID_NAME | thrown | The spec’s name is not a single identifier. Thrown by defineFunction, before any engine sees it. |
DEFINE_FUNCTION_INVALID_SPEC | thrown | The spec is otherwise malformed (bad args, unsupported type, missing call). Thrown by defineFunction. |
DEFINE_FUNCTION_ARITY_MISMATCH | thrown | The call site passed the wrong number of arguments. Raised at evaluation time. |
DEFINE_FUNCTION_ARGUMENT_TYPE | thrown | An argument was the wrong value type. Raised at evaluation time. |
DEFINE_FUNCTION_RETURN_TYPE | thrown | The call implementation returned a value that did not match returns. Raised at evaluation time, an authoring bug rather than a user one. |
WorkerErrorCodes
Section titled “WorkerErrorCodes”In the package as ERROR_CODE_CATALOGUES.WorkerErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
WORKER_CANCELLED | thrown | The caller aborted the request through its AbortSignal. |
WORKER_TERMINATED | thrown | The worker engine was torn down while a request was still in flight. |
WORKER_TRANSPORT_FAILED | thrown | The transport failed or the worker exited before answering. |
WORKER_UNKNOWN_METHOD | thrown | A request named a method the runtime does not expose. |
WORKER_NOT_INITIALISED | thrown | A request arrived before the runtime finished building its engine. |
WORKER_UNKNOWN_PACKAGE | thrown | An init named a package the runtime could not resolve. |
WORKER_ARGUMENT_NOT_CLONEABLE | thrown | A 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. |
Category tags
Section titled “Category tags”TagsErrorCodes
Section titled “TagsErrorCodes”In the package as ERROR_CODE_CATALOGUES.TagsErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
TAG_NO_DOCUMENT | as a value | A tag total evaluated with no document to read tagged lines from. |
TAG_EMPTY | as a value | A tag total or a breakdown with no lines carrying the tag, or no tagged lines at all. |
TAG_NON_NUMERIC | as a value | A tagged line that is not a number or a quantity. |
TAG_BREAKDOWN_NO_WHOLE | as a value | A breakdown whose tagged lines add up to zero, so no tag has a share. |
ChartErrorCodes
Section titled “ChartErrorCodes”In the package as ERROR_CODE_CATALOGUES.ChartErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
PLOT_EXPR_MUST_BE_SYNCHRONOUS | thrown | A plot whose expression reaches live data (weather, stocks, a currency rate), which a plot cannot wait for at every point. |
SPARKLINE_NOT_A_SERIES | as a value | as sparkline given something other than a list or a range of at least two numbers. |
Colour
Section titled “Colour”ColourErrorCodes
Section titled “ColourErrorCodes”In the package as ERROR_CODE_CATALOGUES.ColourErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
COLOUR_INVALID | as a value | A string was not a hex colour or a known CSS colour name. |
COLOUR_EXPECTED_COLOUR | as a value | A function expected a colour argument and got something else. |
COLOUR_BAD_ARGUMENTS | as a value | A function was called with the wrong number or type of arguments. |
UNKNOWN_COLOUR_FUNCTION | thrown | A colour call (rgb(...), hsl(...)) by a name the colour package does not have. |
Conditionals and checks
Section titled “Conditionals and checks”ConditionalsErrorCodes
Section titled “ConditionalsErrorCodes”In the package as ERROR_CODE_CATALOGUES.ConditionalsErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
CHECK_EXPECTED_COMPARISON | either | A check whose statement is not a comparison. The message shows the forms a check takes. |
CHECK_FAILED | as a value | A check whose comparison does not hold. The message says by how much; a host counts these through ParsingResult.checks. |
CHECK_INCOMPARABLE | as a value | A check between two values that cannot be compared: text with <, or quantities of different measures. |
CHECK_JOIN_UNSUPPORTED | thrown | A 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_BOOLEAN | as a value | not or a prefix ! before a value that is not true or false (not 5, !"yes"). The message names what the value is. |
Constants
Section titled “Constants”ConstantsErrorCodes
Section titled “ConstantsErrorCodes”In the package as ERROR_CODE_CATALOGUES.ConstantsErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
UNKNOWN_CONSTANT | as a value | A physical constant asked for by a name the table does not have. |
Converters and rounding
Section titled “Converters and rounding”ConvertersErrorCodes
Section titled “ConvertersErrorCodes”In the package as ERROR_CODE_CATALOGUES.ConvertersErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
AS_CONVERTER_EXPECTED_NAME | thrown | as followed by something that is not a converter name, as in 1 as as. |
AS_CONVERTER_EXPECTED_NUMBER | as a value | A number notation (as engineering, as compact) given something that is not a number or a quantity. |
AS_CONVERTER_UNSUPPORTED_BASE | thrown | as base N for a base the engine cannot write numbers in. The message lists the bases it can. |
INVALID_DECIMAL_PLACES | thrown | to N dp with a place count outside 0 to 100. |
INVALID_SIGNIFICANT_FIGURES | thrown | to N sf with a count that is not a whole number from 1 to 17. |
INVALID_ROUNDING_INCREMENT | thrown | to nearest ... followed by something that is not a positive number or a word such as ten or hundred. |
Cooking
Section titled “Cooking”CookingErrorCodes
Section titled “CookingErrorCodes”In the package as ERROR_CODE_CATALOGUES.CookingErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
GAS_MARK_EXPECTED_TEMPERATURE | as a value | as gas mark was given something that is not an oven temperature. |
GAS_MARK_OFF_THE_DIAL | as a value | An oven temperature that no gas mark stands for, hotter or colder than the dial goes. |
GAS_MARK_UNKNOWN | as a value | A dial setting the table does not have, such as gas mark 12. |
SERVINGS_NOT_POSITIVE | as a value | A serving count that cannot scale a recipe, such as zero. |
Crypto
Section titled “Crypto”CryptoErrorCodes
Section titled “CryptoErrorCodes”In the package as ERROR_CODE_CATALOGUES.CryptoErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
CRYPTO_NOT_CONFIGURED | as a value | A crypto price asked for on an engine whose crypto package was created without a fetchPrice. The host supplies one through createCryptoPackage. |
DateFormErrorCodes
Section titled “DateFormErrorCodes”In the package as ERROR_CODE_CATALOGUES.DateFormErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
DATE_EXPECTED | as a value | A date form (2nd Tuesday of, age of) given something that is not a date, as in age of 5. |
DATE_FIELD_EXPECTED_DATE | as a value | A question asked of a date (day of the week on, week number of) given something that is not a date. |
DATE_OUT_OF_RANGE | as a value | A timestamp outside the dates the engine can hold, about 273,000 years either side of 1970. |
AS_ISO8601_NEEDS_DATE | as a value | as iso8601 given something that is not a date, a Unix timestamp or ISO 8601 text. |
AS_ISO8601_DURATION_TOO_LONG | as a value | as 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_STRING | as a value | Text given as an ISO 8601 date or time that does not read as one. |
INVALID_WEEKDAY | as a value | A weekday given as a number that is not a day of the week. |
MISSING_WEEKDAY | thrown | next or last with no day of the week after it. |
NTH_WEEKDAY_OUT_OF_RANGE | as a value | An ordinal weekday the month does not have, such as the fifth Monday of a month with four. |
DAYS_IN_EXPECTED_PERIOD | thrown | days in followed by something that is not a month, a quarter or a year. |
WORKDAYS_IN_EXPECTED_DURATION | as a value | workdays in given a quantity that is not a length of time. |
WORKDAYS_UNTIL_UNSUPPORTED | thrown | workdays until or workdays since, which are not counted on the calendar. The message points at workdays between. |
AS_DATE_NEEDS_TIMESTAMP | as a value | as date given a value that is neither a Unix timestamp, ISO 8601 text nor a date. |
AS_TIMESTAMP_NEEDS_DATE | as a value | as timestamp given a value that is neither a date, ISO 8601 text nor a Unix timestamp. |
AS_TIME_NEEDS_DATE | as a value | as 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_EXPECTED | thrown | start of or end of followed by something that is not a week, a month or a year. |
WEEKDAY_ALONE | thrown | A 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. |
DatetimeErrorCodes
Section titled “DatetimeErrorCodes”In the package as ERROR_CODE_CATALOGUES.DatetimeErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
DATE_INPUT_LOCALE_INVALID | thrown | date.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_MISMATCH | either | A 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_DAY | either | A 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. |
Derived units
Section titled “Derived units”DerivedUnitsErrorCodes
Section titled “DerivedUnitsErrorCodes”In the package as ERROR_CODE_CATALOGUES.DerivedUnitsErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
AS_UNIT_EXPECTED_QUANTITY | as a value | as <unit> given a plain number or something else with no unit. |
AS_UNIT_INCOMPATIBLE | as a value | as <unit> given a quantity that does not measure what the unit does. |
Encoding
Section titled “Encoding”EncodingErrorCodes
Section titled “EncodingErrorCodes”In the package as ERROR_CODE_CATALOGUES.EncodingErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
ENCODING_EXPECTED_TEXT | as a value | An encoding form given something that is not text in quotes. |
ENCODING_DECODE_FAILED | as a value | Text that does not decode in the encoding named: not valid base64, not a JSON Web Token, not a query string. |
UNKNOWN_ENCODING | as a value | from <name> naming an encoding the package does not know. The message lists the ones it does. |
Finance
Section titled “Finance”FinanceErrorCodes
Section titled “FinanceErrorCodes”In the package as ERROR_CODE_CATALOGUES.FinanceErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
CASH_FLOW_ARGUMENT_COUNT | as a value | A cash-flow form given no flows, or npv given flows with no rate. |
CASH_FLOW_EXPECTED_AMOUNT | as a value | A 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_RATE | thrown | npv of ... with no at <rate> after the flows. |
CASH_FLOW_TOO_FEW | as a value | A cash-flow form given fewer than two flows: an outlay and a return are the least it reads. |
CASH_FLOW_OUT_OF_RANGE | as a value | A net present value beyond the range of a number at the rate given. |
IRR_NO_SIGN_CHANGE | as a value | irr of flows that never change sign (all money out, or all in), so no rate makes their value zero. |
IRR_NONE | as a value | irr of flows no rate above -100% brings to zero. |
IRR_NOT_UNIQUE | as a value | irr of flows with several internal rates of return. The message lists them rather than choosing one. |
IRR_UNRESOLVED | as a value | irr of flows whose rates are too close together to tell apart. |
PAYBACK_NO_OUTLAY | as a value | payback of flows whose running total is never below zero, so there is nothing to pay back. |
PAYBACK_NEVER | as a value | payback of flows that never recover the outlay. The message says how far short the total ends. |
INFLATION_EXPECTED_USD | either | <amount> in <year> dollars of an amount in another currency that has its own index: the phrase asks for dollars. |
INFLATION_EXPECTED_CURRENCY | either | <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_INDEX | as a value | An 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_IN | thrown | what is <amount> followed by neither from <year> nor in <year> worth in <year>, as in what is $300 and $50 from 2003. |
INFLATION_EXPECTED_YEAR | as a value | The 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_WORD | thrown | assuming <rate>% not followed by the word inflation. |
SAVINGS_GOAL_SYNTAX | thrown | how much per month to reach <target> followed by neither in nor over and the time the saving runs for. |
UNKNOWN_COMPOUNDING_INTERVAL | thrown | compounding <interval> naming an interval the package does not know. The message lists the ones it does. |
RecurringScheduleErrorCodes
Section titled “RecurringScheduleErrorCodes”In the package as ERROR_CODE_CATALOGUES.RecurringScheduleErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
RECURRING_INTERVAL_NOT_POSITIVE | thrown | every 0 weeks and the like: the interval a payment repeats on has to be a positive count, or the number of payments is undefined. |
Geometry
Section titled “Geometry”GeometryErrorCodes
Section titled “GeometryErrorCodes”In the package as ERROR_CODE_CATALOGUES.GeometryErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
GEOMETRY_EXPECTED_SHAPE | thrown | A shape measure (area of) followed by something that is not a shape. The message lists the shapes. |
GEOMETRY_ERROR | as a value | A shape given a dimension that is not a length or a number, or a set of dimensions that make no shape. |
Goal seek
Section titled “Goal seek”GoalSeekErrorCodes
Section titled “GoalSeekErrorCodes”In the package as ERROR_CODE_CATALOGUES.GoalSeekErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
GOAL_SEEK_SYNTAX | thrown | A goal seek not written as solve line N for <name> = <target>. The message shows the form. |
GOAL_SEEK_REQUIRES_VARIABLE_NAME | thrown | A goal seek with no name to vary after for. |
GOAL_SEEK_TARGET_NOT_NUMERIC | as a value | A 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_MISMATCH | as a value | A 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_USED | as a value | A goal seek varying a name its target line does not read, which could never move the answer. |
GOAL_SEEK_NON_FINITE | as a value | A 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_SOLUTION | as a value | A 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_INVALID | as a value | A goal seek’s between <low> and <high> whose ends are not two different finite numbers in the unknown’s measure (#739). |
GOAL_SEEK_SEVERAL_SOLUTIONS | as a value | A 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_SOLUTIONS | as a value | A 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_CONVERGE | as a value | A goal seek that did not reach the target within its steps, or narrowed to a point where the line jumps across it. |
HashErrorCodes
Section titled “HashErrorCodes”In the package as ERROR_CODE_CATALOGUES.HashErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
HASH_EXPECTED_TEXT | as a value | A hash function (sha256(...)) given something that is not text in quotes. |
Health
Section titled “Health”HealthErrorCodes
Section titled “HealthErrorCodes”In the package as ERROR_CODE_CATALOGUES.HealthErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
HEALTH_BAD_INPUT | as a value | A health function given an argument of the wrong kind, such as a weight where a height goes. The message shows the call. |
Knowledge
Section titled “Knowledge”KnowledgeErrorCodes
Section titled “KnowledgeErrorCodes”In the package as ERROR_CODE_CATALOGUES.KnowledgeErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
KNOWLEDGE_NOT_CONFIGURED | as a value | A knowledge question asked on an engine whose knowledge package was created without an answerQuery. The host supplies one through createKnowledgePackage. |
Lines, ranges and sections
Section titled “Lines, ranges and sections”LinesErrorCodes
Section titled “LinesErrorCodes”In the package as ERROR_CODE_CATALOGUES.LinesErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
LINE_RANGE_NON_NUMERIC | as a value | A line range or an above aggregate reaching a line that is not a number or a quantity. |
LINE_RANGE_EMPTY | as a value | A line range or an above aggregate with no figures in it: every line blank, a heading, or the top of the document. |
LINE_REFERENCE_DELETED | as a value | A reference to a line that has since been deleted. An editor that keeps references through edits writes it as line deleted. |
SECTION_NO_DOCUMENT | as a value | A section total evaluated with no document to read headings from. |
SECTION_NOT_FOUND | as a value | A section total naming a heading the note does not have. The message lists the headings it has. |
SECTION_AMBIGUOUS | as a value | A section total naming a heading two or more headings share. |
SECTION_EMPTY | as a value | A section with no figures under its heading. |
INPUTS_OF_SYNTAX | thrown | inputs of not followed by a line reference, as in inputs of line 4. |
TRACE_CYCLE | as a value | inputs of a line that reads its own answer, directly or round a loop of lines. |
TRACE_FORWARD_REFERENCE | as a value | inputs of a line that reads a line below it, whose order of working cannot be traced. |
Map and reduce
Section titled “Map and reduce”MapReduceErrorCodes
Section titled “MapReduceErrorCodes”In the package as ERROR_CODE_CATALOGUES.MapReduceErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
MAP_REDUCE_EXPECTED_COLLECTION_NAME | thrown | A 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_SYNCHRONOUS | thrown | A map, reduce, sum or prod whose expression reaches live data, which it cannot wait for once per element. |
Maths phrases
Section titled “Maths phrases”MathPhrasesErrorCodes
Section titled “MathPhrasesErrorCodes”In the package as ERROR_CODE_CATALOGUES.MathPhrasesErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
AGGREGATE_CALL_EMPTY | thrown | An aggregate call with nothing inside, as in mean(), refused rather than answered 0. |
AGGREGATE_CALL_RANGE | thrown | An 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_RESERVED | thrown | A 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_FROM | thrown | clamp <value> followed by neither between nor from. |
REMAINDER_EXPECTED_DIVIDED_BY | thrown | remainder of <a> not followed by divided by or /. |
ROOT_EXPECTED_OF | thrown | root <n> not followed by of. |
LOG_EXPECTED_BASE | thrown | log <n> not followed by base. |
PROPORTION_EXPECTED_WHAT | thrown | A proportion (5 km is to 500 m as 5 cm is to what) missing its final what. |
WEIGHTED_AVERAGE_MISSING_WEIGHT | thrown | A weighted average with a value that has no at <weight> after it. |
Matrix
Section titled “Matrix”MatrixErrorCodes
Section titled “MatrixErrorCodes”In the package as ERROR_CODE_CATALOGUES.MatrixErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
EMPTY_MATRIX_LITERAL | thrown | A matrix written as [], which has no shape. |
RAGGED_MATRIX_LITERAL | thrown | A matrix whose rows have different numbers of columns. The message names the row. |
INVALID_MATRIX_SLICE_ARITY | thrown | A matrix slice with other than two ranges, one for the rows and one for the columns. |
Networking
Section titled “Networking”IpErrorCodes
Section titled “IpErrorCodes”In the package as ERROR_CODE_CATALOGUES.IpErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
IP_EXPECTED | as a value | A networking form given something that is not an IP address or a subnet. |
IP_NO_PREFIX | as a value | hosts in or netmask of given an address with no prefix length, as in /24. |
IP_NEEDS_ADDRESS_AND_PREFIX | as a value | broadcast of, network of or last address of given something without both an address and a prefix. |
IP_EXPECTED_ADDRESS | as a value | <address> in <subnet> with no address on the left. |
IP_EXPECTED_BLOCK | as a value | <address> in <subnet> with no subnet on the right. |
IP_PREFIX_OUT_OF_RANGE | as a value | A 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_MISMATCH | as a value | <address> in <subnet> with an IPv4 address and an IPv6 subnet, or the other way round. |
IPV6_NO_BROADCAST | as a value | broadcast of an IPv6 block: IPv6 has no broadcast address, and last address of gives the block’s last one. |
Numerals
Section titled “Numerals”NumeralsErrorCodes
Section titled “NumeralsErrorCodes”In the package as ERROR_CODE_CATALOGUES.NumeralsErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
NUMERAL_EXPECTED_NUMBER | as a value | A numeral form (as roman, as words) given something that is not a number. |
NUMERAL_OUT_OF_RANGE | as a value | A 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_TEXT | as a value | from roman given something that is not text in quotes. |
NUMERAL_INVALID_ROMAN | as a value | from roman given text that is not a valid Roman numeral. |
Payroll
Section titled “Payroll”PayrollErrorCodes
Section titled “PayrollErrorCodes”In the package as ERROR_CODE_CATALOGUES.PayrollErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
PAYROLL_EXPECTED_GBP | as a value | The banded forms were given something other than a pound salary. |
PAYROLL_EXPECTED_RATE | as a value | A stated tax rate was not a rate a take-home can be worked out from. |
PAYROLL_UNKNOWN_LOAN_PLAN | either | with student loan with no plan, or a plan that does not exist (with plan 3 student loan). |
PAYROLL_CONFLICTING_CASE | either | Two places, two pensions, a plan named twice, or two undergraduate plans on one take-home line. |
PAYROLL_EXPECTED_PENSION_RATE | either | with 150% pension: a pension contribution that is not a percentage between 0 and 100. |
PAYROLL_NEGATIVE_SALARY | as a value | -£50,000 after tax or hourly for -£50,000: a salary below zero, which no one is paid. |
Percentage
Section titled “Percentage”PercentageErrorCodes
Section titled “PercentageErrorCodes”In the package as ERROR_CODE_CATALOGUES.PercentageErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
IS_WHAT_EXPECTED_PERCENT | thrown | <a> is what not followed by % or percent. |
IS_WHAT_EXPECTED_PREPOSITION | thrown | <a> is <n>% not followed by of what, off what or on what. |
IS_WHAT_EXPECTED_WORD | thrown | A percentage phrase missing one of its words part-way through. The message names the word. |
PERCENT_CHANGE_EXPECTED_TO | thrown | percent change from <a> not followed by to and the new value. |
Places
Section titled “Places”GeoErrorCodes
Section titled “GeoErrorCodes”In the package as ERROR_CODE_CATALOGUES.GeoErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
GEO_EXPECTED_PLACE | as a value | A distance or bearing was given something that is not a place. |
GEO_OUT_OF_RANGE | as a value | A latitude or longitude was outside the globe. |
GEO_BAD_ANGLE | as a value | An angle literal’s parts do not make an angle (75 minutes, say). |
GEO_NOT_A_PLACE | as a value | Two lettered angles side by side were not one latitude and one longitude. |
GEO_NO_BEARING | as a value | The two places have no single direction between them. |
GEO_EXPECTED_ANGLE | as a value | as dms was given something that is not an angle or a place. |
GEO_EXPECTED_SECOND_PLACE | thrown | A distance or bearing between places with no second place after its to or and. |
Random
Section titled “Random”RandomErrorCodes
Section titled “RandomErrorCodes”In the package as ERROR_CODE_CATALOGUES.RandomErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
RANDOM_EXPECTED_COUNT | as a value | random hex given a count that is not a number of 0 or more. |
RANDOM_PICK_EMPTY | as a value | pick with no options to choose from. |
RANDOM_SHUFFLE_EXPECTED_LIST | as a value | shuffle given something that is not a single row or column. |
RANDOM_SEED_EXPECTED_VALUE | thrown | random seed with nothing after it to seed with. |
RatioErrorCodes
Section titled “RatioErrorCodes”In the package as ERROR_CODE_CATALOGUES.RatioErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
RATIO_EXPECTED_NUMBERS | as a value | ratio(...) given something that is not a whole number. |
RATIO_INVALID | as a value | ratio(...) given fewer than two whole positive numbers. |
Screen and image sizes
Section titled “Screen and image sizes”WebErrorCodes
Section titled “WebErrorCodes”In the package as ERROR_CODE_CATALOGUES.WebErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
WEB_EXPECTED_PIXELS | as a value | A width or a height was not a whole count of pixels. |
DENSITY_EXPECTED_NUMBER | thrown | at 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_REM | as a value | A size measured against a root font size was in neither px nor rem. |
WEB_EXPECTED_ROOT_SIZE | as a value | The stated root font size was not a size a rem can be measured against. |
WEB_EXPECTED_PIXELS_OR_LENGTH | as a value | A size measured against a density was neither a CSS length nor a physical length. |
WEB_EXPECTED_DENSITY | as a value | The stated density was not a number of dots per inch above zero. |
Shopping
Section titled “Shopping”ShoppingErrorCodes
Section titled “ShoppingErrorCodes”In the package as ERROR_CODE_CATALOGUES.ShoppingErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
VS_INCOMPARABLE | as a value | <a> vs <b> between two amounts that are not the same kind of thing. |
Statistics
Section titled “Statistics”StatisticsErrorCodes
Section titled “StatisticsErrorCodes”In the package as ERROR_CODE_CATALOGUES.StatisticsErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
STAT_ARGUMENT_COUNT | as a value | A statistics function given the wrong number of arguments. The message shows the call. |
STAT_EXPECTED_LIST | as a value | A statistic that reads a list given something else, or too short a list. |
STAT_EXPECTED_LISTS | as a value | A two-list statistic (correlation, slope) given something other than two lists. |
STAT_LENGTH_MISMATCH | as a value | A two-list statistic given lists of different lengths. |
STAT_TOO_FEW | as a value | A two-list statistic given fewer than two paired points. |
STAT_EMPTY | as a value | A statistic of an empty list. |
STAT_EXPECTED_PERCENT | as a value | percentile given no percentage. |
STAT_PERCENT_RANGE | as a value | percentile given a percentage outside 0 to 100. |
STAT_EXPECTED_VALUE | as a value | A distribution or zscore given something that is not a number where a number goes. |
STAT_PROBABILITY_RANGE | as a value | A distribution given a probability outside the range it takes. |
STAT_NOT_WHOLE | as a value | A distribution given a count that is not a whole number. |
STAT_COUNT_RANGE | as a value | A distribution given a count below zero, or more successes than trials. |
STAT_SD_NOT_POSITIVE | as a value | A normal distribution given a standard deviation of zero or less. |
STAT_GAMMA_POLE | as a value | gamma at zero or a negative whole number, where it is undefined. |
STAT_OVERFLOW | as a value | A distribution or gamma whose answer is beyond the largest number a double can hold. |
STAT_NO_CONVERGENCE | as a value | A distribution whose series did not settle on an accurate answer for arguments this large. |
Stocks
Section titled “Stocks”StocksErrorCodes
Section titled “StocksErrorCodes”In the package as ERROR_CODE_CATALOGUES.StocksErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
STOCKS_NOT_CONFIGURED | as a value | A stock price asked for on an engine whose stocks package was created without a provider. The host supplies one through createStocksPackage. |
STOCKS_INVALID_TICKER | thrown | stock(...) given something that is not a ticker symbol. |
STOCKS_EXPECTED_ON | thrown | A historical price field (close, open) not followed by on <date>. |
STOCKS_EXPECTED_DATE | thrown | on not followed by a date the stocks package reads. |
STOCKS_INVALID_DATE | thrown | A date after on that is not a real calendar date, or has no four-digit year. |
Symbolic
Section titled “Symbolic”SymbolicErrorCodes
Section titled “SymbolicErrorCodes”In the package as ERROR_CODE_CATALOGUES.SymbolicErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
SYMBOLIC_ARGUMENT_MUST_BE_SYNCHRONOUS | thrown | An algebra verb (der, integral, solve) whose expression reaches live data. |
Tables
Section titled “Tables”TablesErrorCodes
Section titled “TablesErrorCodes”In the package as ERROR_CODE_CATALOGUES.TablesErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
TABLE_NO_DOCUMENT | as a value | Cross-line table reads need a real document, absent on the single-expression path. |
TABLE_NOT_FOUND | as a value | No markdown table was found above the query line. |
TABLE_COLUMN_NOT_FOUND | as a value | The named column is not one of the table’s headers. |
TABLE_COLUMN_NO_NUMERIC_CELLS | as a value | The column held no number or money cells to aggregate. |
TABLE_COLUMN_PERCENT_CELL | as a value | A column summary met a percentage cell, which it does not add to or compare with the figures (#651). |
TABLE_COLUMN_AMBIGUOUS | either | A lookup named a column the header carries more than once. |
TABLE_ROW_NOT_FOUND | either | No row’s first cell carries the label an exact lookup asked for. |
TABLE_ROW_AMBIGUOUS | either | More than one row carries the label, so an exact lookup cannot choose. |
TABLE_LOOKUP_KEY_INVALID | either | An exact lookup’s key was neither quoted text nor a plain number. |
TABLE_CELL_EMPTY | either | The looked-up cell is empty. |
TABLE_CELL_NOT_A_VALUE | either | The looked-up cell is text, not a number, an amount of money or a percentage. |
TABLE_BANDS_MALFORMED | either | The 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_ZERO | either | A progressive total’s first band does not start at 0, so part of the amount falls in no band. |
TABLE_BAND_BELOW_FIRST | either | A band lookup’s amount is below where the first band starts. |
TABLE_BAND_AMOUNT_INVALID | either | The amount placed in the bands is not a plain number or money, or is below zero for a progressive total. |
TABLE_BAND_UNIT_MISMATCH | either | The amount, the band starts and the rates name currencies that do not go together. |
TABLE_COLUMN_NAME_EXPECTED | thrown | A column form (sum of column, column ... for) not followed by a column name in quotes. |
TABLE_LOOKUP_FOR_EXPECTED | thrown | A table lookup not followed by for and a row, as in column "cost" for "food". |
TextExtractionErrorCodes
Section titled “TextExtractionErrorCodes”In the package as ERROR_CODE_CATALOGUES.TextExtractionErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
TEXT_EXPECTED | as a value | A form was given something other than text where it reads text. |
TEXT_ARGUMENT_COUNT | as a value | A call form was given the wrong number of arguments. |
TEXT_NO_NUMBERS | as a value | The text has no numbers for an aggregate to work on. |
TEXT_NO_AMOUNTS | as a value | The text has no amounts of money for an aggregate to work on. |
TEXT_TOO_MANY_NUMBERS | as a value | The text holds more numbers than one read allows. |
TEXT_NO_MATCH | as a value | The pattern does not occur in the text. |
TEXT_PATTERN_TOO_COSTLY | as a value | Matching took more steps than one call allows. |
TEXT_PATTERN_INVALID | either | The pattern is not well formed. |
TEXT_PATTERN_UNSUPPORTED | either | The pattern uses a feature the matcher refuses. |
TEXT_PATTERN_TOO_LARGE | either | The pattern is past a size limit. |
TEXT_NOT_JSON | either | field was given text that is not JSON. |
TEXT_FIELD_PATH_INVALID | either | field was given a malformed path. |
TEXT_FIELD_NOT_FOUND | either | The path leads nowhere in the JSON. |
TEXT_FIELD_NULL | either | The field holds null. |
TEXT_FIELD_INEXACT_NUMBER | either | The field holds a whole number too large to read exactly. |
Times and time zones
Section titled “Times and time zones”TimeFormErrorCodes
Section titled “TimeFormErrorCodes”In the package as ERROR_CODE_CATALOGUES.TimeFormErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
TIME_ZONE_EXPECTED_CITY | thrown | time in not followed by a city or a zone. |
TIME_ZONE_EXPECTED_IN | thrown | A time in one zone not followed by in <city> for the zone to convert to. |
TIME_ZONE_EXPECTED_TARGET | thrown | in not followed by a city or a zone to convert to. |
TIME_ZONE_UNKNOWN | thrown | A 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_MANY | thrown | One line naming more time zones than a line takes. |
TIME_ZONE_MISSING_DATE | thrown | on not followed by a date, in a time converted on a given day. |
TIME_DIFFERENCE_EXPECTED_CITY | thrown | time difference between not followed by a city or a zone. |
TIME_DIFFERENCE_EXPECTED_SECOND_CITY | thrown | time difference between <a> and not followed by a second city or zone. |
OVERLAP_EXPECTED_HOURS | thrown | overlap of not followed by hours, as in 9am to 5pm. |
OVERLAP_EXPECTED_IN | thrown | The hours of an overlap not followed by in and the places. |
OVERLAP_EXPECTED_CITY | thrown | in not followed by a city or a zone, in an overlap. |
TIMECODE_EXPECTED_FPS | thrown | A video timecode or frame count without its frame rate, as in at 30 fps. |
TIMECODE_EXPECTED_FRAMES | thrown | A timecode followed by in and something other than frames. |
TIMECODE_FRAME_OUT_OF_RANGE | thrown | A timecode whose frame number is not below the frame rate. |
TIME_IN_ZONE_UNDATED | thrown | time 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_MALFORMED | either | An 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. |
TimezoneErrorCodes
Section titled “TimezoneErrorCodes”In the package as ERROR_CODE_CATALOGUES.TimezoneErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
TIME_ZONE_SKIPPED_TIME | as a value | 1: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_TIME | as a value | 1: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_DATE | as a value | 3pm London on 5 in Tokyo, or 3pm on 5: the on clause was given something that is not a date. |
TIME_ZONE_EXPECTED_TIME | as a value | t 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_ZONES | as a value | overlap of 9am to 5pm in London: one place has nothing to overlap with. |
OVERLAP_HOURS_EMPTY | as a value | overlap of 9am to 9am in London and Paris: hours that start where they end have no length. |
Travel
Section titled “Travel”TravelErrorCodes
Section titled “TravelErrorCodes”In the package as ERROR_CODE_CATALOGUES.TravelErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
TRIP_EXPECTED_DISTANCE | as a value | The first quantity was not a distance. |
TRIP_EXPECTED_ECONOMY | as a value | The second quantity was not a fuel economy. |
TRIP_EXPECTED_FUEL_PRICE | as a value | The price was not an amount of money for a volume. |
UomErrorCodes
Section titled “UomErrorCodes”In the package as ERROR_CODE_CATALOGUES.UomErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
COOKING_CONVERSION_REQUIRES_UNIT | as a value | A cooking conversion of a plain number, with no mass or volume unit. |
COOKING_CONVERSION_UNSUPPORTED_UNIT | as a value | A cooking conversion from or to a unit that is not a mass or a volume. |
COOKING_UNKNOWN_INGREDIENT | as a value | A cooking conversion between mass and volume for an ingredient with no density in the table. |
Variables
Section titled “Variables”VariablesErrorCodes
Section titled “VariablesErrorCodes”In the package as ERROR_CODE_CATALOGUES.VariablesErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
EXPECTED_IDENTIFIER | thrown | A : or global : not followed by a name, as in := 5. |
NAME_HAS_RESERVED_WORD | thrown | A 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_MARK | thrown | A 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. |
Weather
Section titled “Weather”WeatherErrorCodes
Section titled “WeatherErrorCodes”In the package as ERROR_CODE_CATALOGUES.WeatherErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
WEATHER_GEOCODING_API_ERROR | thrown | Open-Meteo’s geocoding endpoint returned a non-OK HTTP status. |
WEATHER_CITY_NOT_FOUND | thrown | Geocoding 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_ERROR | thrown | Open-Meteo’s forecast endpoint returned a non-OK HTTP status. |
WEATHER_FORECAST_RESPONSE_MALFORMED | thrown | Forecast 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_KIND | thrown | WeatherPackage.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_CITY | thrown | A weather form (weather in, temperature in) not followed by a city. |
What-if and sweeps
Section titled “What-if and sweeps”WhatIfErrorCodes
Section titled “WhatIfErrorCodes”In the package as ERROR_CODE_CATALOGUES.WhatIfErrorCodes.
| Code | Arrives | When it arises |
|---|---|---|
WHAT_IF_NO_DOCUMENT | as a value | A what-if or a sweep evaluated with no document to re-run. |
WHAT_IF_TARGETS_ITSELF | as a value | A what-if or a sweep naming its own line, which it would re-run. |
WHAT_IF_REQUIRES_VARIABLE_NAME | thrown | A what-if with no name to change after with. |
WHAT_IF_DUPLICATE_INPUT | thrown | A what-if that sets the same name twice. |
WHAT_IF_TOO_MANY_INPUTS | thrown | A what-if changing more inputs than one takes. |
WHAT_IF_INPUT_PENDING | as a value | A what-if whose input is still waiting on live data. |
SWEEP_REQUIRES_VARIABLE_NAME | thrown | A sweep with no name to step through after for. |
SWEEP_REQUIRES_STEP | thrown | A sweep with no step after its range. |
SWEEP_RANGE_NOT_NUMERIC | as a value | A sweep whose start, end or step is not a finite number, percentage or quantity. |
SWEEP_RANGE_MISMATCH | as a value | A sweep whose start, end and step are not all the same kind of value. |
SWEEP_STEP_ZERO | as a value | A sweep with a step of zero, which never reaches its end. |
SWEEP_STEP_WRONG_SIGN | as a value | A sweep whose step moves away from its end. |
SWEEP_TOO_MANY_STEPS | as a value | A sweep that would try more values than one sweep allows. |
SWEEP_TOO_MUCH_WORK | as a value | A sweep that would re-run more lines in all than one sweep allows. |
SWEEP_OVER_BUDGET | as a value | A sweep whose steps together reached a limit on the work one evaluation may do. |
SWEEP_STEP_FAILED | as a value | A sweep one of whose steps failed. The message names the input value and the failure. |
SWEEP_ANSWER_NOT_NUMERIC | as a value | A sweep one of whose answers is not a number or a quantity, which is all a sweep lists. |
SWEEP_ANSWER_PERCENTAGE | as a value | A sweep of a line that answers a percentage, which a list (a row of plain numbers) cannot hold. |
SWEEP_DATE_STEP_NOT_DURATION | as a value | A sweep between two dates whose step is not a length of time (step 5), or is working days. |
SCENARIO_UNKNOWN | as a value | line N under bull with no scenario bull with ... line above it. |
SCENARIO_DUPLICATE | as a value | line N under bull where two lines above both declare a scenario named bull. |