Skip to content

Commit

Permalink
fix(client): fix rollbar sending client error cases
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed Jun 30, 2023
1 parent a8c6150 commit 91c545d
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions client/src/app/services/rollbar.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,7 @@ export class RollbarErrorHandler implements ErrorHandler {
return;
}

const savefile = this.store.snapshot();
delete savefile.mods;

// check if the user will let errors be sent
if (savefile.options.telemetryErrors) {
const extraOptions: any = {};

// double check if the user will let their savefile be sent
if (savefile.options.telemetrySavefiles) {
extraOptions.gameState = JSON.stringify(savefile);
}

// send the error, and possibly the savefile
this.rollbar.rollbarInstance?.error(
err.originalError || err,
extraOptions,
);
}

// if we have debug mode enabled, tell the player an error happened
if (savefile.options.debugMode) {
this.notify.error(err.message);
}
// send the error, and possibly the savefile
this.rollbar.rollbarInstance?.error(err.originalError || err);
}
}

0 comments on commit 91c545d

Please sign in to comment.