(op: string, fn: (wos: WorkOS) => Promise<A>)
| 403 | // span reads `workos.<operation>` instead of one undifferentiated "workos" |
| 404 | // bucket, and failures log which call actually failed. |
| 405 | const use = <A>(op: string, fn: (wos: WorkOS) => Promise<A>) => |
| 406 | withServiceLogging( |
| 407 | `workos.${op}`, |
| 408 | workosErrorFromFailure, |
| 409 | tryPromiseService(() => fn(workos)), |
| 410 | ); |
| 411 | |
| 412 | const authenticateSealedSession = (sessionData: string) => |
| 413 | Effect.gen(function* () { |