( name: string, publicError: () => E, effect: Effect.Effect<A, unknown, R>, )
| 46 | * public shape. |
| 47 | */ |
| 48 | export const withServiceLogging = <A, E, R>( |
| 49 | name: string, |
| 50 | publicError: () => E, |
| 51 | effect: Effect.Effect<A, unknown, R>, |
| 52 | ): Effect.Effect<A, E, R> => |
| 53 | effect.pipe( |
| 54 | Effect.tapCause((cause) => Effect.logError(`${name} failed`, cause)), |
| 55 | Effect.mapError(publicError), |
| 56 | Effect.withSpan(name), |
| 57 | ) as Effect.Effect<A, E, R>; |
no outgoing calls
no test coverage detected