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

Function tryPromiseService

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

Source from the content-addressed store, hash-verified

89
90/** Lift a Promise-returning function into Effect with a typed failure channel. */
91export const tryPromiseService = <A>(fn: () => Promise<A>): Effect.Effect<A, ServiceAdapterError> =>
92 Effect.tryPromise({
93 try: fn,
94 catch: (cause) => new ServiceAdapterError({ cause }),
95 });
96
97/**
98 * 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