Files
klz-cables.com/lib/services/errors/error-reporting-service.ts
Marc Mintel b05a21350c
Some checks failed
Build & Deploy / deploy (push) Failing after 3m45s
umami, glitchtip, redis
2026-01-18 15:37:51 +01:00

17 lines
566 B
TypeScript

export type ErrorReportingUser = {
id?: string;
email?: string;
username?: string;
};
export type ErrorReportingLevel = 'fatal' | 'error' | 'warning' | 'info' | 'debug' | 'log';
export interface ErrorReportingService {
captureException(error: unknown, context?: Record<string, unknown>): string | undefined;
captureMessage(message: string, level?: ErrorReportingLevel): string | undefined;
setUser(user: ErrorReportingUser | null): void;
setTag(key: string, value: string): void;
withScope<T>(fn: () => T, context?: Record<string, unknown>): T;
}