Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error and warning codes

Every Aura diagnostic carries a stable code, which makes it easy to grep for in CI logs and to refer to in discussion. E is an error, W a warning — and under --strict warnings block too.

Host (E00xx)

Raised at the boundary between a manifest and the application that embeds it. E0001-E0006 carry no source position, because nothing was parsed yet; E0007-E0009 point at the call in the script (D35).

CodeMeaningHow to fix it
E0001the host could not open a file, or aura.lock is unreadablethe message carries the underlying I/O error
E0002the script exports nothing by that namecheck the name; only : properties and pub def are exports
E0003the export is not a functionbind it with get, not function or call
E0004the function takes a different number of argumentschecked when the function is bound, before any call
E0005an argument has no exact Aura valuean integer past i64, a NaN or an infinity, a byte string; refused rather than coerced
E0006the result does not match the host’s typethe message names the path inside the value where it did not
E0007the script imports or calls a host function the host did not providea host: module is provided by the application at run time, so aura eval stops here; aura check lists what the script needs
E0008a host function returned an errorthe message is the application’s; the script cannot recover from it
E0009a host function was called with the wrong number of arguments (at load) or the wrong types (at the call), or returned a value Aura cannot holdthe message names the function
E0010a script was called from inside one of its own host functionsnot allowed (D35): return a value to the script instead
E0011a reload would change what the script exports: an export removed, or its kind or number of arguments changedthe host may have bound it, so the old version keeps serving (D36); restart to change the exports

Lexing (E01xx)

CodeMeaningHow to fix it
E0101no digit after the decimal point (12.)write 12.0 or 12
E0102a string left unclosed at end of lineAura strings are single-line; close the "
E0103an integer literal does not fit in i64
E0104a registry import without a versionimport a/b@v1 as x — the version is mandatory (D8)
E0105unexpected character
E0106an unclosed #{ interpolation
E0107an unterminated block stringclose it with end at the opener’s indentation (D16)
E0108a digit separator is misplaced_ groups by threes away from the point: 10_000_000, 0.000_001 — never 100_, 1__0 or 2_3_7_1_9_3_3

Syntax (E02xx)

CodeMeaningHow to fix it
E0200a specific token was expectedthe message names which
E0201a v1.1 inline block (metrics port: 9090)use an object block: metrics: … end (D3)
E0203a missing end or ]
E0204an expression was expected
E0205statements are separated by line breaks
E0206pub not immediately before def, type or enumproperties export themselves; = is always private
E0207a cond with no else armadd else -> ...: every branch must produce a value (D14)
E0208nesting too deepthe recursion limit that makes deeply-nested input an error rather than a stack overflow; a chain like a + b + c counts its length (D42)
E0211an enum member is not a quoted stringmembers are listed as strings, one per line (D18)
E0212a duplicate enum memberlist each member once
E0213an enum with no membersan empty set cannot be satisfied
E0214a value is computed and thrown awaya bare expression outside the end of a function goes nowhere; write key:, name = or assert (D40)
E0215a body has properties and also ends in a valuea function returns one or the other; make the value a property, or drop the properties (D40)

Evaluation (E03xx)

CodeMeaningHow to fix it
E0301assigned twice — values are immutableuse a new name, or a nested scope
E0302shadowing an outer variable without the markershadow x = ... (D7)
W0303shadow shadows nothingdrop the shadow
E0304integer arithmetic overfloweduse Float, or reconsider the magnitudes
E0305division by zero
E0306an operand of the wrong typeconditions must be Bool; there is no truthiness
E0307a non-scalar in interpolation or joinserialise it explicitly with .to_json()
E0308unknown object fielda typo? use .get(key, default) for optional ones
E0309unknown methodsee the method reference; a package’s function fields are called the same way
E0310missing capabilitythe error names the flag you need (D1)
E0311a path outside the directories allowed by --allow-read
E0312fewer arguments passed than the function has parameters
E0313a file read failed (I/O)
E0314malformed TOML, JSON or YAML while parsing
E0315a method that needs a lambda (map, filter) did not get one
E0316a malformed expression inside #{...}
E0317a list index out of range, or first() / last() on an empty listuse .get(i, default)
E0318obj["key"] — brackets are not allowed on objectsuse the dotted form: obj."key" (D11)
E0319a malformed durationthe format is "1h30m", units d/h/m/s
E0320a malformed dateRFC 3339: "2026-07-18T12:00:00Z"
E0321malformed base64base64_decode() on input that is not base64
E0322a concatenated list or string exceeds its size limit+ doubles: 1M elements / 16 MiB is the ceiling
E0323to_object() got the same key twicea silent overwrite would depend on element order; deduplicate first
E0324null rendered as textinterpolation and to_str() must agree; say what the empty case prints (D31)
E0325an evaluation ran out of its step budget--max-steps raises it, --stats shows what is spent (D34); in Script, the budget is per call (D33)
E0326an evaluation ran out of its memory budget--max-memory raises it; every value and frame created counts (D34)
E0327zip() got lists of different lengthsa dropped tail would drop configuration silently; cut the longer one with slice first (D39)
E0328a value nested more than 256 lists and objects deepalmost always a loop that wraps its result each turn; build the levels side by side instead (D43)
E0398internal: a closure’s environment was droppeda bug in Aura — please report it with the manifest
E0399evaluation nested more than 256 levelsalmost always a recursive function without the case that stops it; map, filter and reduce walk a list without nesting (D42)
E0533now() and timestamp() do not existthe host passes time in: env("BUILD_TIME", ...) (D13)

Modules and packages (E04xx)

CodeMeaningHow to fix it
E0401a cyclic import (the chain is in the message)break the cycle: move shared code into a third module
E0402a package’s integrity hash does not match aura.lockthe package’s contents changed — find out why
E0403--frozen: no entry in aura.lockrun aura add locally and commit the lock
E0404module not found, or does not resolvecheck the path, the version, --registry-dir
E0410an import the interpreter was handed without the module loaderonly reachable when embedding the evaluator directly; use facade::eval_file/eval_source, which load modules

Analysis and validation (E05xx / W05xx)

CodeMeaningHow to fix it
W0501an unused variabledead code — delete it
W0502an unused import
W0503an unused function or typeif it is a package’s API, mark it pub
E0504an undeclared variablea declaration must precede its use
E0505env() or read_file() under --hermeticpass the value in from the host, or drop the flag and grant the capability
E0511a field the schema requires is missing
E0512a field’s type does not match the schemaInt and Float are different types
E0513an extra field (--strict only)remove the field, or add it to the schema
E0514a value outside the enumthe hint suggests the nearest member and lists the set (D18)
E0515a schema invariant does not hold for this instancethe schema’s own assert; the message shown is the one it carries
E0516a default its own field can never acceptchecked where the schema is declared, not where it is used
W0512an effectful call in an imported moduleimports have no I/O rights; reconsider the package’s design
W0513a nullable field is filled from get(key) or env(name) with no fallbackabsence becomes null silently; name the fallback, or drop the ?
E0530an assert failedthe message is your own
E0531fail(...) was called

Serialisation (E06xx)

CodeMeaningHow to fix it
E0601a function or schema inside the exported treethe key path is in the message; at the top level pub items are excluded automatically
E0602a non-finite Float (NaN or Inf)
E0603a format limitation (TOML has no null; its root must be an object)
E0604two keys flatten to the same json-flat keya key containing a dot is indistinguishable from a nested path; use --format json, or rename the key