Package: effect
Module: ErrorReporter
An ErrorReporter receives reported failures and forwards them to an
external system such as a logging service or error tracker.
When to use
Use as the interface for custom reporters that forward reported Effect failures to logging, monitoring, or error-tracking systems.
Details
Reporting is triggered by Effect.withErrorReporting,
ErrorReporter.report, or built-in boundaries in the HTTP and RPC server
modules. Use make to create a reporter; it handles deduplication
and per-error annotation extraction automatically.
See
make for creating an ErrorReporter from a callbacklayer for registering reporters in the environmentreport for manually reporting a CauseEffect.withErrorReporting for reporting failures from an effectSignature
export interface ErrorReporter {
readonly [TypeId]: TypeId
report(options: {
readonly cause: Cause.Cause<unknown>
readonly fiber: Fiber.Fiber<unknown, unknown>
readonly timestamp: bigint
}): void
}
Since v4.0.0