chore: Stop reporting AxiosError to Sentry (#10974)

This commit is contained in:
Iván Ovejero 2024-09-26 12:16:10 +02:00 committed by GitHub
parent 9fc3699beb
commit 262693be65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,7 @@
import { GlobalConfig } from '@n8n/config';
// eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import
import { QueryFailedError } from '@n8n/typeorm';
import { AxiosError } from 'axios';
import { createHash } from 'crypto';
import { ErrorReporterProxy, ApplicationError } from 'n8n-workflow';
import Container from 'typedi';
@ -67,6 +68,8 @@ export const initErrorHandling = async () => {
beforeSend(event, { originalException }) {
if (!originalException) return null;
if (originalException instanceof AxiosError) return null;
if (
originalException instanceof QueryFailedError &&
['SQLITE_FULL', 'SQLITE_IOERR'].some((errMsg) => originalException.message.includes(errMsg))