MCPcopy Create free account
hub / github.com/cloudflare/computer / isNotFound

Function isNotFound

packages/computer/src/artifacts/cli.ts:282–291  ·  view source on GitHub ↗

True when a thrown error is a repo-not-found miss from either layer.

(cause: unknown)

Source from the content-addressed store, hash-verified

280
281/** True when a thrown error is a repo-not-found miss from either layer. */
282function isNotFound(cause: unknown): boolean {
283 if (cause instanceof ArtifactError) return cause.code === "ENOTFOUND";
284 // The binding raises its own ArtifactsError with code NOT_FOUND.
285 return (
286 typeof cause === "object" &&
287 cause !== null &&
288 "code" in cause &&
289 (cause as { code?: unknown }).code === "NOT_FOUND"
290 );
291}
292
293/**
294 * Fold a git token into a remote URL as basic-auth, yielding a

Callers 1

tryGetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected