web: disable Sentry.showReportDialog

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-10-20 11:46:02 +02:00
parent 070438aabe
commit c10ce5c679
1 changed files with 2 additions and 12 deletions

View File

@ -38,17 +38,6 @@ export function configureSentry(canDoPpi: boolean = false): Promise<Config> {
if (hint.originalException instanceof Response || hint.originalException instanceof DOMException) { if (hint.originalException instanceof Response || hint.originalException instanceof DOMException) {
return null; return null;
} }
if (event.exception) {
me().then(user => {
Sentry.showReportDialog({
eventId: event.event_id,
user: {
email: user.user.email,
name: user.user.name,
}
});
});
}
return event; return event;
}, },
}); });
@ -58,12 +47,13 @@ export function configureSentry(canDoPpi: boolean = false): Promise<Config> {
const intf = window.location.pathname.replace(/.+if\/(.+)\//, "$1"); const intf = window.location.pathname.replace(/.+if\/(.+)\//, "$1");
Sentry.setTag(TAG_SENTRY_COMPONENT, `web/${intf}`); Sentry.setTag(TAG_SENTRY_COMPONENT, `web/${intf}`);
} }
console.debug("authentik/config: Sentry enabled.");
if (config.errorReportingSendPii && canDoPpi) { if (config.errorReportingSendPii && canDoPpi) {
me().then(user => { me().then(user => {
Sentry.setUser({ email: user.user.email }); Sentry.setUser({ email: user.user.email });
console.debug("authentik/config: Sentry with PII enabled."); console.debug("authentik/config: Sentry with PII enabled.");
}); });
} else {
console.debug("authentik/config: Sentry enabled.");
} }
} }
return config; return config;