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

Function isAlreadyExists

examples/artifacts/src/index.ts:225–231  ·  view source on GitHub ↗
(cause: unknown)

Source from the content-addressed store, hash-verified

223}
224
225function isAlreadyExists(cause: unknown): boolean {
226 return (
227 cause instanceof Error &&
228 cause.name === "ArtifactsError" &&
229 (cause as { code?: unknown }).code === "ALREADY_EXISTS"
230 );
231}
232
233function errorJSON(error: unknown, status: number): Response {
234 const message = error instanceof Error ? error.message : String(error);

Callers 1

handleCreateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected