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

Function isNotFound

apps/cloud/scripts/drain-workos-events.ts:59–63  ·  view source on GitHub ↗
(cause: unknown)

Source from the content-addressed store, hash-verified

57 Effect.tryPromise({ try: fn, catch: (cause) => cause });
58
59const isNotFound = (cause: unknown): boolean =>
60 typeof cause === "object" &&
61 cause !== null &&
62 "status" in cause &&
63 (cause as { readonly status: unknown }).status === 404;
64
65const noneWhenGone = <A>(fn: () => Promise<A>) =>
66 Effect.tryPromise({ try: fn, catch: (cause) => cause }).pipe(

Callers 1

noneWhenGoneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected