ci: Stop reporting to Sentry SQLITE_FULL errors (no-changelog) (#10183)

This commit is contained in:
Iván Ovejero 2024-07-25 14:31:44 +02:00 committed by GitHub
parent 112d6b883d
commit 2dc3ff49d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,8 @@
import { createHash } from 'crypto';
import config from '@/config';
import { ErrorReporterProxy, ApplicationError } from 'n8n-workflow';
// eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import
import { QueryFailedError } from '@n8n/typeorm';
let initialized = false;
@ -65,6 +67,13 @@ export const initErrorHandling = async () => {
addEventProcessor((event, { originalException }) => {
if (!originalException) return null;
if (
originalException instanceof QueryFailedError &&
originalException.message.includes('SQLITE_FULL')
) {
return null;
}
if (originalException instanceof ApplicationError) {
const { level, extra, tags } = originalException;
if (level === 'warning') return null;