19 lines
562 B
TypeScript
19 lines
562 B
TypeScript
import type { ErrorReportingLevel, ErrorReportingService, ErrorReportingUser } from './error-reporting-service';
|
|
|
|
export class NoopErrorReportingService implements ErrorReportingService {
|
|
captureException(_error: unknown, _context?: Record<string, unknown>) {
|
|
return undefined;
|
|
}
|
|
|
|
captureMessage(_message: string, _level?: ErrorReportingLevel) {
|
|
return undefined;
|
|
}
|
|
|
|
setUser(_user: ErrorReportingUser | null) {}
|
|
setTag(_key: string, _value: string) {}
|
|
|
|
withScope<T>(fn: () => T, _context?: Record<string, unknown>) {
|
|
return fn();
|
|
}
|
|
}
|