web: cleanup sentry error catching
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
8b7f698c7b
commit
db9ea8603c
|
@ -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;
|
||||
}
|
||||
|
|
Reference in New Issue