diff --git a/frontend/src/sentry.ts b/frontend/src/sentry.ts index d48769dbf..32362f80e 100644 --- a/frontend/src/sentry.ts +++ b/frontend/src/sentry.ts @@ -1,6 +1,7 @@ import 'virtual:vite-plugin-sentry/sentry-config' import type {App} from 'vue' import type {Router} from 'vue-router' +import {AxiosError} from 'axios' export default async function setupSentry(app: App, router: Router) { const Sentry = await import('@sentry/vue') @@ -18,5 +19,15 @@ export default async function setupSentry(app: App, router: Router) { }), ], tracesSampleRate: 1.0, + beforeSend(event, hint) { + + if ((typeof hint.originalException?.code !== 'undefined' && + typeof hint.originalException?.message !== 'undefined') + || hint.originalException instanceof AxiosError) { + return null + } + + return event + }, }) }