(op: string, fn: () => Promise<A>)
| 43 | |
| 44 | const makeService = (db: DrizzleDb): MemberDirectoryShape => { |
| 45 | const read = <A>(op: string, fn: () => Promise<A>) => |
| 46 | withServiceLogging( |
| 47 | `member_directory.${op}`, |
| 48 | () => |
| 49 | new MemberDirectoryError({ |
| 50 | message: `Failed to read the member directory (${op})`, |
| 51 | }), |
| 52 | tryPromiseService(fn), |
| 53 | ); |
| 54 | |
| 55 | // One projection for every read, so the seam's row shape is built in exactly |
| 56 | // one place. `membershipId` is non-null by the `known` predicate below. |
no test coverage detected