mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 12:19:09 +00:00
chore: Convert ErrorReporting to a Service to use DI. Add some tests (no-changelog) (#11279)
This commit is contained in:
committed by
GitHub
parent
5300e0ac45
commit
73145b70b8
@@ -2,11 +2,8 @@
|
||||
import type { EntityManager } from '@n8n/typeorm';
|
||||
// eslint-disable-next-line n8n-local-rules/misplaced-n8n-typeorm-import
|
||||
import { DataSource as Connection } from '@n8n/typeorm';
|
||||
import {
|
||||
DbConnectionTimeoutError,
|
||||
ensureError,
|
||||
ErrorReporterProxy as ErrorReporter,
|
||||
} from 'n8n-workflow';
|
||||
import { ErrorReporter } from 'n8n-core';
|
||||
import { DbConnectionTimeoutError, ensureError } from 'n8n-workflow';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import { inTest } from '@/constants';
|
||||
@@ -38,7 +35,7 @@ if (!inTest) {
|
||||
connectionState.connected = true;
|
||||
return;
|
||||
} catch (error) {
|
||||
ErrorReporter.error(error);
|
||||
Container.get(ErrorReporter).error(error);
|
||||
} finally {
|
||||
pingTimer = setTimeout(pingDBFn, 2000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user