(op: string, fn: () => Promise<A>)
| 1048 | */ |
| 1049 | export const makeWorkOsMirrorStore = (db: DrizzleDb): WorkOsMirrorShape => { |
| 1050 | const run = <A>(op: string, fn: () => Promise<A>) => |
| 1051 | withServiceLogging( |
| 1052 | `workos_mirror.${op}`, |
| 1053 | (failure) => |
| 1054 | new WorkOsMirrorError({ |
| 1055 | operation: op, |
| 1056 | reason: userStoreReasonFromCause(failure), |
| 1057 | }), |
| 1058 | tryPromiseService(fn), |
| 1059 | ); |
| 1060 | |
| 1061 | const writes = makeWrites(db); |
| 1062 |