refactor(core): Skip sending webhook activation errors to Sentry (no-changelog) (#7171)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-09-27 16:57:52 +02:00
committed by GitHub
parent 07d072c28f
commit ebce6fe1b0
5 changed files with 23 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
import { createHash } from 'crypto';
import config from '@/config';
import { ErrorReporterProxy, NodeError } from 'n8n-workflow';
import { ErrorReporterProxy, ExecutionBaseError } from 'n8n-workflow';
let initialized = false;
@@ -39,7 +39,7 @@ export const initErrorHandling = async () => {
const seenErrors = new Set<string>();
addGlobalEventProcessor((event, { originalException }) => {
if (originalException instanceof NodeError && originalException.severity === 'warning')
if (originalException instanceof ExecutionBaseError && originalException.severity === 'warning')
return null;
if (!event.exception) return null;
const eventHash = createHash('sha1').update(JSON.stringify(event.exception)).digest('base64');