MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / toError

Function toError

packages/kernel/runtime-quickjs/src/index.ts:48–49  ·  view source on GitHub ↗
(cause: unknown)

Source from the content-addressed store, hash-verified

46const EXECUTION_FILENAME = "executor-quickjs-runtime.js";
47
48const toError = (cause: unknown): Error =>
49 cause instanceof Error ? cause : new Error(String(cause));
50
51// Defect surfaced to the sandbox when a tool dispatch reaches the
52// reject path. Two sources reach here:

Callers 3

toErrorMessageFunction · 0.70
serializeJsonFunction · 0.70
drainJobsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected