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

Function read

apps/host-selfhost/src/auth/member-directory.ts:72–82  ·  view source on GitHub ↗
(op: string, fn: () => Promise<A>)

Source from the content-addressed store, hash-verified

70
71const makeService = (adapter: BetterAuthAdapter): MemberDirectoryShape => {
72 const read = <A>(op: string, fn: () => Promise<A>): Effect.Effect<A, MemberDirectoryError> =>
73 Effect.tryPromise(fn).pipe(
74 Effect.tapCause((cause) => Effect.logError(`member_directory.${op} failed`, cause)),
75 Effect.mapError(
76 () =>
77 new MemberDirectoryError({
78 message: `Failed to read the member directory (${op})`,
79 }),
80 ),
81 Effect.withSpan(`member_directory.${op}`),
82 );
83
84 const undecodable = (op: string) => () =>
85 new MemberDirectoryError({

Callers 2

memberRowsFunction · 0.70
userRowsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected