MCPcopy Create free account
hub / github.com/effect-app/libs / tapErrorCause

Function tapErrorCause

packages/infra/src/reportError.ts:18–28  ·  view source on GitHub ↗
(name: string, unknownOnly?: boolean)

Source from the content-addressed store, hash-verified

16// : Effect.void)
17// }
18const tapErrorCause = (name: string, unknownOnly?: boolean) => {
19 const report = reportError(name)
20 const log = logError(name)
21 return <A, E, R>(self: Effect.Effect<A, E, R>) =>
22 Effect.tapCause(self, (cause) =>
23 unknownOnly
24 ? Cause.hasFails(cause)
25 ? log(cause)
26 : report(cause)
27 : report(cause))
28}
29export const reportRequestError = tapErrorCause("request")
30export const reportUnknownRequestError = tapErrorCause("request", true)

Callers 1

reportError.tsFile · 0.85

Calls 4

reportErrorFunction · 0.90
logErrorFunction · 0.90
logFunction · 0.50
reportFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…