Skip to content

Commit

Permalink
fix: reduce amount of information sent to bugsnag
Browse files Browse the repository at this point in the history
  • Loading branch information
arielsvg committed Nov 5, 2020
1 parent 97e3549 commit 7e2cadc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/assets/javascripts/services/errorReporting.ts
Expand Up @@ -6,7 +6,7 @@ import Bugsnag from '@bugsnag/js';
declare const __VERSION__: string;

function redactFilePath(line: string): string {
const fileName = line.match(/\w+\.(html|js)?.*/)?.[0];
const fileName = line.match(/\w+\.(html|js)/)?.[0];
const redacted = '<redacted file path>';
if (fileName) {
return redacted + '/' + fileName;
Expand All @@ -28,6 +28,7 @@ export function startErrorReporting() {
collectUserIp: false,
autoTrackSessions: false,
releaseStage: isDev ? 'development' : undefined,
enabledBreadcrumbTypes: ['error', 'log'],
onError(event) {
/**
* Redact any data that could be used to identify user,
Expand Down

0 comments on commit 7e2cadc

Please sign in to comment.