mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 13:27:31 -08:00
fix(editor): Don't report certain error types to Sentry (no-changelog) (#11090)
This commit is contained in:
parent
90e6d3384c
commit
e5c7215bca
|
@ -30,6 +30,7 @@ import { FontAwesomePlugin } from './plugins/icons';
|
||||||
import { createPinia, PiniaVuePlugin } from 'pinia';
|
import { createPinia, PiniaVuePlugin } from 'pinia';
|
||||||
import { JsPlumbPlugin } from '@/plugins/jsplumb';
|
import { JsPlumbPlugin } from '@/plugins/jsplumb';
|
||||||
import { ChartJSPlugin } from '@/plugins/chartjs';
|
import { ChartJSPlugin } from '@/plugins/chartjs';
|
||||||
|
import { AxiosError } from 'axios';
|
||||||
|
|
||||||
const pinia = createPinia();
|
const pinia = createPinia();
|
||||||
|
|
||||||
|
@ -37,7 +38,22 @@ const app = createApp(App);
|
||||||
|
|
||||||
if (window.sentry?.dsn) {
|
if (window.sentry?.dsn) {
|
||||||
const { dsn, release, environment } = window.sentry;
|
const { dsn, release, environment } = window.sentry;
|
||||||
Sentry.init({ app, dsn, release, environment });
|
Sentry.init({
|
||||||
|
app,
|
||||||
|
dsn,
|
||||||
|
release,
|
||||||
|
environment,
|
||||||
|
beforeSend(event, { originalException }) {
|
||||||
|
if (
|
||||||
|
!originalException ||
|
||||||
|
originalException instanceof AxiosError ||
|
||||||
|
(originalException instanceof Error && originalException.message.includes('ResizeObserver'))
|
||||||
|
) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return event;
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
app.use(TelemetryPlugin);
|
app.use(TelemetryPlugin);
|
||||||
|
|
Loading…
Reference in a new issue