effect-io-ai

Package: effect
Module: ErrorReporter

ErrorReporter.getAttributes

Reads the ErrorReporter.attributes annotation from an error object, returning an empty record when unset.

When to use

Use to inspect the attributes that reporter callbacks will receive for an object error.

Details

Returns the value stored under ErrorReporter.attributes, or the module’s shared empty record when the annotation is absent.

Gotchas

The annotation value is returned as-is; this helper does not validate or clone it.

See

Signature

declare const getAttributes: (error: object) => ReadonlyRecord<string, unknown>

Source

Since v4.0.0