AniLink - v3.0.0
    Preparing search index...

    Interface ReportDiagnosticOptions

    Options controlling how reportDiagnostic emits one diagnostic.

    interface ReportDiagnosticOptions {
        diagnostics: DiagnosticsMode;
        hookName: string;
        kind: "hook-failure" | "state-owner" | "token-refresh";
        message: string;
        onHookError?: OnHookErrorHandler;
        rawError?: unknown;
        requestId?: string;
        rethrown?: boolean;
    }
    Index
    diagnostics: DiagnosticsMode

    The resolved diagnostics mode for the request.

    hookName: string

    The hook or diagnostic name the failure is attributed to.

    kind: "hook-failure" | "state-owner" | "token-refresh"

    Which diagnostic fired.

    message: string

    Human-readable description of the failure.

    onHookError?: OnHookErrorHandler

    Consumer callback observing hook failures, when configured.

    rawError?: unknown

    The raw thrown value when the diagnostic reports a throwing hook, so the observer can inspect the original error. Attached as the cause of the Error handed to onHookError. A diagnostic carrying a rawError always reaches a configured observer. Diagnostics modes control only unsolicited fallback output, not the consumer's observer.

    requestId?: string

    The correlation ID of the affected request, when in scope.

    rethrown?: boolean

    Whether the reported failure is rethrown to the caller after the diagnostic is emitted. When true, the console.warn fallback is skipped entirely. The caller receives the failure as a rejection, without a duplicate console warning. A configured observer still receives the diagnostic in every mode.