Skip to content

Error Codes

DUUMBI outputs structured JSONL errors to stdout. Each error includes a code, message, node ID, and contextual details.

CodeErrorDescriptionHow to fix
E001Type mismatchOperand types don’t match (e.g., Add with i64 and f64)Ensure both operands have the same type. Use explicit conversion if mixing i64/f64.
E002Unknown OpUnrecognized @type in the graphCheck spelling of the @type field. See Op Types for valid ops.
E003Missing fieldRequired field not present on a nodeAdd the missing field. E.g., Add requires duumbi:left and duumbi:right.
E004Orphan reference@id reference points to a non-existent nodeVerify the @id target exists. Check for typos in the reference path.
E005Duplicate @idTwo nodes share the same @idRename one of the duplicate @id values to be unique.
E006No entry functionNo main function found in the programAdd a function with "@id": "fn:main" to your graph.
E007CycleCircular dependency detected in the graphRemove the circular reference. Functions can call each other, but data flow must be acyclic.
E008Link failedLinker (cc) returned an errorEnsure cc (or $CC) is installed. Check runtime function signatures.
E009Schema invalidNode doesn’t match core.schema.jsonValidate your JSON-LD against the schema. Check @type and required fields.
// ❌ E001: Add with mismatched types
{
"@type": "duumbi:Add",
"duumbi:left": { "@type": "duumbi:Const", "value": 3 },
"duumbi:right": { "@type": "duumbi:ConstF64", "value": 2.5 }
}
// ✅ Fixed: both operands are i64
{
"@type": "duumbi:Add",
"duumbi:left": { "@type": "duumbi:Const", "value": 3 },
"duumbi:right": { "@type": "duumbi:Const", "value": 2 }
}
CodeErrorDescriptionHow to fix
E010Unresolved cross-module refFunction call targets a missing moduleAdd the module as a dependency in config.toml or create it locally.
E011Dependency not foundModule not in workspace, vendor, or cacheRun duumbi deps install to download missing dependencies.
E012Module conflictTwo modules provide the same functionRename one function or use scoped imports.
E013Registry unreachableCannot connect to the registry serverCheck network connection. Verify registry URL in config.toml.
E014Auth failedInvalid or missing authentication tokenRun duumbi registry login <name> to refresh credentials.
E015Integrity mismatchDownloaded module hash doesn’t match lockfileDelete .duumbi/cache/ and re-run duumbi deps install. If persists, update lockfile.
E016Version not foundRequested version doesn’t exist in registryRun duumbi search <name> to see available versions. Update version constraint.
CodeErrorDescriptionHow to fix
E020Single ownerValue has multiple ownersUse Move to transfer ownership, or Borrow for shared access.
E021Use after moveValue accessed after ownership transferAccess the value before the Move, or clone it.
E022Borrow exclusivity&mut T while other borrows existEnd all immutable borrows before creating a mutable borrow.
E023Lifetime exceededReference outlives its borrowed valueEnsure the reference is dropped before the source value.
E024Drop incompleteOwned value not dropped before scope exitAdd a Drop op before the function returns.
E025Double freeValue dropped more than onceRemove the duplicate Drop op.
E026Dangling referenceReference to an already-dropped valueDrop references before dropping the source value.
E027Move while borrowedOwner moved while borrows are activeDrop all borrows before moving ownership.
E028Lifetime param missingFunction needs lifetime annotationAdd lifetime parameters to function signature.
E029Return lifetime mismatchReturned reference has wrong lifetimeEnsure returned reference’s lifetime matches the function’s declared lifetime.
// ❌ E021: using a value after it was moved
[
{ "@type": "duumbi:Alloc", "@id": "…/0",
"duumbi:value": { "@type": "duumbi:ConstString", "value": "hello" } },
{ "@type": "duumbi:Move", "@id": "…/1",
"duumbi:source": { "@id": "…/0" }, "duumbi:target": "new_owner" },
{ "@type": "duumbi:Print", "@id": "…/2",
"duumbi:value": { "@id": "…/0" } } // ← E021: "…/0" was moved
]
// ✅ Fixed: use Borrow instead of Move, or access before Move
[
{ "@type": "duumbi:Alloc", "@id": "…/0",
"duumbi:value": { "@type": "duumbi:ConstString", "value": "hello" } },
{ "@type": "duumbi:Borrow", "@id": "…/1",
"duumbi:source": { "@id": "…/0" } },
{ "@type": "duumbi:Print", "@id": "…/2",
"duumbi:value": { "@id": "…/1" } },
{ "@type": "duumbi:Drop", "@id": "…/3",
"duumbi:value": { "@id": "…/0" } }
]

See the Ownership Model guide for full rules and diagrams.

CodeErrorDescriptionHow to fix
E030Unhandled Resultresult<T,E> not matched or unwrappedAdd a Match op with both ok_block and err_block.
E031Unhandled Optionoption<T> not matched or unwrappedAdd a Match op with both some_block and none_block.
E032Non-exhaustive matchMatch doesn’t cover all variantsAdd missing match arms (e.g., both Ok and Err for Result).
E033Type param mismatchResult/Option type parameters don’t matchEnsure the Match arms handle the correct types.
E034Unwrap without checkUnwrap without prior IsOk/IsSomeAdd a check (ResultIsOk/OptionIsSome) + Branch before unwrapping, or use Match instead.
E035Wrong payload typeUnwrapped value type doesn’t match expectedCheck the type parameter of the Result/Option matches what you’re extracting.
// ❌ E030: Result not handled
{ "@type": "duumbi:ResultOk", "@id": "…/0",
"duumbi:value": { "@type": "duumbi:Const", "value": 42 } }
// ...no Match or IsOk check on "…/0"
// ✅ Fixed: use Match for exhaustive handling
{ "@type": "duumbi:Match", "@id": "…/1",
"duumbi:value": { "@id": "…/0" },
"duumbi:ok_block": "…/ok_arm",
"duumbi:err_block": "…/err_arm" }

All errors are emitted as structured JSONL to stdout:

{
"level": "error",
"code": "E001",
"message": "Type mismatch: Add expects matching operand types",
"nodeId": "duumbi:main/main/entry/2",
"file": "graph/main.jsonld",
"details": { "expected": "i64", "found": "f64", "field": "duumbi:left" }
}

Fields: level (error/warning), code (E001–E035), message (human-readable), nodeId (graph location), file (source file), details (structured context).