Skip to content

Errors ​

Three families: host errors that become HTTP responses, kernel error codes that the host maps or passes through, and the checks vlo doctor prints. Source: src/host/errors.ts, crates/kernel/src/error.rs, src/cli/checks.ts.

Host errors ​

Every class extends VloError (code, status, message) and is exported from @oona/vlo/host. A route catches it and answers { "error": { code, message } } with status. Anything that is not a VloError becomes 500 internal.

ClasscodeHTTPWhen
RunNotFoundrun_not_found404No run with that id.
TaskNotFoundtask_not_found404No task with that id on a callback.
RunTerminalrun_terminal409An event other than a task result or closing marker reached a completed, failed, cancelled or continued run.
IllegalEventkernel code, see below409The kernel refused the event. kernelError holds the original { code, message, seq?, step_id? }.
Nondeterminismrefold_mismatch409The checkpoint hash or a re-fold disagreed with the journal. The run is failed first with cause nondeterminism_detected and a nondeterminism marker, then this is thrown.
ReducerFailedreducer_failed409The reducer threw (WorkflowFailure or anything else), or a spawn / continue_as_new named a workflow this host does not know. applyEvent swallows it and records the fail marker (cause app_error) with the trigger event as payload; the pre-event checkpoint stays.
WorkflowRejectedunknown_workflow400Start, fold or spawn named a workflow this host has not registered.
Unauthorizedunauthorized401Missing or wrong bearer, bad push signature, bad or expired link token.
BadRequestbad_request400Malformed body, missing field, invalid signal payload, bad max_ms.
LeaseLostlease_lost410A heartbeat for an attempt that no longer holds its lease. The worker should stop.

Routes also raise three local ones with the same shape: role_not_served (404, the host lacks the role), no_route (404), and links_disabled (503, no secret to sign links with). The push endpoint answers 503 no_push_secret, 404 no_handler and 409 { "duplicate": true } as plain JSON.

Kernel error codes ​

The kernel never throws; every export returns { ok: false, error: { code, message, seq?, step_id? } }. The host wraps a refusal in IllegalEvent, passing the code through unchanged. Three codes — unknown_step, already_terminal, bad_seq — are treated as "already folded" (an at-least-once redelivery) and answer duplicate: true instead of failing.

CodeRaised when
malformed_jsonThe input string, a payload, the reducer's state or a command's JSON does not parse.
invalid_eventEmpty run_id or step_id; random is not 32 lowercase hex; both payload and payload_ref set; payload_ref without the blob://sha256/ prefix; an unroutable kind/status/marker combination; a payload_ref reaching a fold unresolved; a lifecycle-only event sent to reduce_step; kernel_state missing on anything but started; event run_id differs from the run.
payload_too_largeInline payload exceeds 262 144 bytes. Offload it and send payload_ref.
run_closedThe RunRef is already completed, failed, cancelled or continued. Distinct from the host's run_terminal, which refuses the event before the kernel is called.
bad_seqstarted arrived while last_seq is not 0.
unknown_stepNo open step with that id (terminal steps are pruned, so a late duplicate lands here, as does the loser of a signal-versus-deadline race).
illegal_transitionStep kind does not match the event kind; the status edge is not in the step machine; an event for a higher attempt than the step's; a retry that skips attempts; started on a run that is not created; a signal for a step not awaiting_signal.
already_terminalAn event for a lower attempt than the step's, or a retry naming an attempt the step already reached.
invalid_commandEmpty activity, workflow, signal name, emit channel or explicit step id; a timer with neither fire_at_ms nor fire_in_ms.
duplicate_step_idA command's explicit id names a step that is still open.
multiple_completionsA reduction contains more than one complete / continue_as_new.
commands_after_completionAny command follows a complete / continue_as_new in the same reduction.

Authoring and runtime errors ​

ClassPackageWhen
ActivityInputError@oona/vlocmd.task(activity, input) was given input that fails the activity's Zod input schema. Thrown synchronously inside the reducer, which fails the run.
WorkflowFailure@oona/vloThe deliberate way to fail a run from a reducer: throw new WorkflowFailure(message, details?). sequence throws it for a task that did not succeed and for a waitFor deadline with onTimeout: "fail".
JournalClosed@oona/vlo/hostAny journal call after close(). code: "journal_closed". Expected during shutdown.
LeaseLost@oona/vlo/hostSee above; also surfaces to a worker as a rejected ctx.heartbeat(), after which ctx.signal is aborted.

vlo doctor ​

Each check is a real round trip and prints ✓, ⚠ or ✗ with a hint under anything that is not ✓. Any ✗ sets exit code 1. --json prints the same Check[].

CheckStatusHintWhat to do
journal✗journal must be a sqlite:// or postgres:// urlFix profile.journal.
journal✗check the journal url and that the database is reachableThe empty write transaction failed after a successful migrate; check network and credentials.
journal✗the schema may be missing; re-run without --no-migrateYou skipped migrations and the tables do not exist yet.
migrate⚠re-run without --no-migrate to apply pending migrationsInformational when --no-migrate was passed.
migrate✗the journal is unreachable: check the url, host and port, and that the database is runningConnection refused or timed out.
migrate✗the journal rejected the credentials in the urlWrong user or password.
migrate✗the database named in the url does not existCreate it, or fix the URL.
migrate✗the journal user needs CREATE on its schemaGrant CREATE on the database so CREATE SCHEMA vlo can run.
blob✗the store is not content-addressed; payload refs would not resolveput returned something other than the sha256 of the bytes; your store breaks the contract.
blob✗the store is truncating writesget returned fewer bytes than were written.
blob✗check the blob url and that the process may write thereBad URL, missing peer dependency for gcs://, or no write permission.
kernel✗run scripts/build-kernel.sh, or set VLO_KERNEL_WASMThe wasm is missing beside src/ or dist/; build it with scripts/build-kernel.sh or point VLO_KERNEL_WASM at one.
kernel⚠over the 1024 KiB budget; build with --releaseA debug build was committed.
kernel✗this SDK speaks protocol 1; rebuild the kernelProtocol mismatch between the wasm and the SDK.
schemas⚠these register on the next host bootNo host has booted this build yet; not an error.
queue:<name>✗give the queue a url, or export defineWorker({ … }, { queues: ["<name>"] })A push queue with no URL and no in-process worker can never be served.
queue:<name>✗queue url must be absoluteThe URL did not parse.
queue:<name>✗the worker host is up but not healthy/healthz on the queue's origin answered non-2xx.
queue:<name>✗start the worker host, or fix the queue url/healthz was unreachable within 3 s.
queue:<name>⚠set \secret` on the queue; unsigned pushes are rejected by the worker`The dispatcher refuses to push unsigned; add the shared secret.
roles⚠a manual dispatcher only advances on POST /v1/timers/tick; set \deploy.cron``An orchestrator in manual mode with no cron declared will never move the outbox.

Details worth knowing: journal reports <dialect> · commit round trip <n> ms; kernel reports protocol <n> · <size> KiB; schemas reports <registered>/<wanted> registered · missing <names>; a pull queue reports pull · served by pollers; with no queues configured the single check queues reports none configured · in-process only.