Skip to content

WorkerErrorCodes

const WorkerErrorCodes: {
WORKER_CANCELLED: "WORKER_CANCELLED";
WORKER_NOT_INITIALISED: "WORKER_NOT_INITIALISED";
WORKER_TERMINATED: "WORKER_TERMINATED";
WORKER_TRANSPORT_FAILED: "WORKER_TRANSPORT_FAILED";
WORKER_UNKNOWN_METHOD: "WORKER_UNKNOWN_METHOD";
WORKER_UNKNOWN_PACKAGE: "WORKER_UNKNOWN_PACKAGE";
};

Defined in: packages/engine/src/errors/WorkerError.ts:21

Codes the worker harness owns, co-located here rather than unioned into the core catalog, matching the convention errors/ErrorCode.ts documents for a domain that keeps its own small code object.

readonly WORKER_CANCELLED: "WORKER_CANCELLED" = "WORKER_CANCELLED";

The caller aborted the request through its AbortSignal.

readonly WORKER_NOT_INITIALISED: "WORKER_NOT_INITIALISED" = "WORKER_NOT_INITIALISED";

A request arrived before the runtime finished building its engine.

readonly WORKER_TERMINATED: "WORKER_TERMINATED" = "WORKER_TERMINATED";

The worker engine was torn down while a request was still in flight.

readonly WORKER_TRANSPORT_FAILED: "WORKER_TRANSPORT_FAILED" = "WORKER_TRANSPORT_FAILED";

The transport failed or the worker exited before answering.

readonly WORKER_UNKNOWN_METHOD: "WORKER_UNKNOWN_METHOD" = "WORKER_UNKNOWN_METHOD";

A request named a method the runtime does not expose.

readonly WORKER_UNKNOWN_PACKAGE: "WORKER_UNKNOWN_PACKAGE" = "WORKER_UNKNOWN_PACKAGE";

An init named a package the runtime could not resolve.