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

Function tryPromiseService

apps/cloud/src/auth/errors.ts:32–36  ·  view source on GitHub ↗
(fn: () => Promise<A>)

Source from the content-addressed store, hash-verified

30
31/** Lift a Promise-returning function into Effect with a typed failure channel. */
32export const tryPromiseService = <A>(fn: () => Promise<A>): Effect.Effect<A, ServiceAdapterError> =>
33 Effect.tryPromise({
34 try: fn,
35 catch: (cause) => new ServiceAdapterError({ cause }),
36 });
37
38/**
39 * Service-boundary error wrapper. Logs the full Cause chain (drizzle

Callers 2

makeServiceFunction · 0.90
useFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected