Skip to content

Commit

Permalink
Prevent error tracking spam
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphiiko committed Oct 30, 2024
1 parent 2c88506 commit f3950e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src-ui/app/services/telemetry.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export class TelemetryService {
);
public settings: Observable<TelemetrySettings> = this._settings.asObservable();

private trackedJSErrors: string[] = [];

constructor() {}

async init() {
Expand Down Expand Up @@ -54,6 +56,8 @@ export class TelemetryService {
colno: e.colno,
message: e.message,
});
if (this.trackedJSErrors.includes(errorData)) return;
this.trackedJSErrors.push(errorData);
this.trackEvent('ui_js_error', {
errorData,
});
Expand Down

0 comments on commit f3950e5

Please sign in to comment.