MCPcopy Create free account
hub / github.com/Effect-TS/effect / toStartError

Function toStartError

packages/platform/node-shared/src/internal/proxyProcess.ts:488–502  ·  view source on GitHub ↗
(options: Options)

Source from the content-addressed store, hash-verified

486}
487
488const toStartError = (options: Options) => (error: NodeJS.ErrnoException): PlatformError.PlatformError => {
489 const executable = options.executable ?? globalThis.process.execPath
490 const timedOut = error.code === "ETIMEDOUT"
491 if (!timedOut && error.syscall !== undefined) {
492 return handleErrnoException("ChildProcess", "layerProxyProcess")(error, [executable])
493 }
494 return PlatformError.systemError({
495 _tag: timedOut ? "TimedOut" : "Unknown",
496 module: "ChildProcess",
497 method: "layerProxyProcess",
498 description: error.message,
499 pathOrDescriptor: executable,
500 cause: error
501 })
502}
503
504/**
505 * Starts a proxy process. Another one is started on demand after it exits, or

Callers 1

makeFunction · 0.85

Calls 1

handleErrnoExceptionFunction · 0.90

Tested by

no test coverage detected