23 lines
581 B
TypeScript
23 lines
581 B
TypeScript
import type {
|
|
ErrorReportingLevel,
|
|
ErrorReportingService,
|
|
ErrorReportingUser,
|
|
} from "./error-reporting-service";
|
|
|
|
export class NoopErrorReportingService implements ErrorReportingService {
|
|
async captureException(_error: unknown, _context?: Record<string, unknown>) {
|
|
return undefined;
|
|
}
|
|
|
|
async 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();
|
|
}
|
|
}
|