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

Function tryPromiseService

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

Source from the content-addressed store, hash-verified

182
183/** Lift a Promise-returning function into Effect with a typed failure channel. */
184export const tryPromiseService = <A>(fn: () => Promise<A>): Effect.Effect<A, ServiceAdapterError> =>
185 Effect.tryPromise({
186 try: fn,
187 catch: (cause) => new ServiceAdapterError({ cause }),
188 });
189
190/**
191 * 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