effect-io-ai

Package: effect
Module: ErrorReporter

ErrorReporter.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

Signature

export interface ErrorReporter {
  readonly [TypeId]: TypeId
  report(options: {
    readonly cause: Cause.Cause<unknown>
    readonly fiber: Fiber.Fiber<unknown, unknown>
    readonly timestamp: bigint
  }): void
}

Source

Since v4.0.0