Crux
Errors

Runtime Errors

Stable Runtime Engine diagnostic codes, causes, and fixes.

Runtime Engine public failures use CruxRuntimeError. Every error has a stable code, a user-facing explanation, what still works, and an exact next step.

import { CruxRuntimeError } from '@use-crux/core/runtime'

try {
  await flow.waitFor(event)
} catch (error) {
  if (error instanceof CruxRuntimeError) {
    console.error(error.code, error.nextStep)
  }
}

Codes

CodeMeaning
RUNTIME_REQUIREDA runtime-bound API was called without config({ runtime }).
CAPABILITY_MISSINGThe configured stack cannot support a used runtime feature.
TARGET_NOT_FOUNDA wake named a target missing from the runtime entry.
TARGET_DUPLICATETwo runtime targets share one durable name.
TARGET_NOT_EXPORTEDA discovered target cannot be imported as a named export.
REPLAY_DIVERGEDFlow replay no longer matches the suspended snapshot fingerprint.
ARTIFACTS_STALEGenerated runtime artifacts are stale.
WAKE_UNVERIFIEDHTTP wake verification failed before durable state was touched.
PUBLIC_URL_UNRESOLVEDProduction HTTP wake has no stable public URL.
SETUP_REQUIREDRequired adapter resources are missing or mismatched.
PAYLOAD_NOT_JSONA durable runtime payload is not JSON-compatible.
WORK_DEAD_LETTEREDWork exhausted retries and is terminal until operator retry.
LEASE_LOSTA stale worker tried to commit after losing its lease.
NAMESPACE_AMBIGUOUSThe inferred runtime namespace is unsafe or ambiguous.
RUNTIME_HOST_ONLYA host-bound runtime was used outside its host boundary.

On this page