web: cleanup sentry error catching

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-28 15:17:27 +01:00
parent 8b7f698c7b
commit db9ea8603c
1 changed files with 2 additions and 9 deletions

View File

@ -15,7 +15,8 @@ export function configureSentry(canDoPpi: boolean = false): Promise<Config> {
Sentry.init({
dsn: "https://a579bb09306d4f8b8d8847c052d3a1d3@sentry.beryju.org/8",
ignoreErrors: [
/network/i,
/network/ig,
/fetch/ig,
],
release: `authentik@${VERSION}`,
tunnel: "/api/v3/sentry/",
@ -30,14 +31,6 @@ export function configureSentry(canDoPpi: boolean = false): Promise<Config> {
if (hint.originalException instanceof SentryIgnoredError) {
return null;
}
if ((hint.originalException as Error | undefined)?.hasOwnProperty("name")) {
if ((hint.originalException as Error | undefined)?.name == 'NetworkError') {
return null;
}
if ((hint.originalException as Error | undefined)?.name.includes("fetch")) {
return null;
}
}
if (hint.originalException instanceof Response || hint.originalException instanceof DOMException) {
return null;
}