n8n
Version:
n8n Workflow Automation Tool
19 lines (18 loc) • 808 B
TypeScript
import { Logger } from '@n8n/backend-common';
import { ErrorReporter } from 'n8n-core';
import { type InstanceAiObservabilityContext } from './observability';
export type InstanceAiErrorReportContext = {
component: string;
} & InstanceAiObservabilityContext;
export declare class InstanceAiErrorReporterService {
private readonly errorReporter;
private readonly logger;
private readonly reportedErrorsByRun;
constructor(logger: Logger, errorReporter: ErrorReporter);
beginRun(runId: string): void;
endRun(runId: string): void;
endAllRuns(): void;
report(error: unknown, context: InstanceAiErrorReportContext): void;
withBoundary<T>(component: string, context: InstanceAiObservabilityContext, fn: () => Promise<T>): Promise<T>;
private shouldSkipDuplicateReport;
}