mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
fix: Disable some error tracking (#4579)
* fix: remove error tracking for Circular reference in deepCopy * fix: remove error tracking on crash detection
This commit is contained in:
parent
2ce747fa01
commit
b2201d0c77
|
@ -2,7 +2,7 @@ import { existsSync } from 'fs';
|
||||||
import { mkdir, utimes, open, rm } from 'fs/promises';
|
import { mkdir, utimes, open, rm } from 'fs/promises';
|
||||||
import { join, dirname } from 'path';
|
import { join, dirname } from 'path';
|
||||||
import { UserSettings } from 'n8n-core';
|
import { UserSettings } from 'n8n-core';
|
||||||
import { ErrorReporterProxy as ErrorReporter, LoggerProxy, sleep } from 'n8n-workflow';
|
import { LoggerProxy, sleep } from 'n8n-workflow';
|
||||||
|
|
||||||
export const touchFile = async (filePath: string): Promise<void> => {
|
export const touchFile = async (filePath: string): Promise<void> => {
|
||||||
await mkdir(dirname(filePath), { recursive: true });
|
await mkdir(dirname(filePath), { recursive: true });
|
||||||
|
@ -20,7 +20,6 @@ const journalFile = join(UserSettings.getUserN8nFolderPath(), 'crash.journal');
|
||||||
export const init = async () => {
|
export const init = async () => {
|
||||||
if (existsSync(journalFile)) {
|
if (existsSync(journalFile)) {
|
||||||
// Crash detected
|
// Crash detected
|
||||||
ErrorReporter.warn('Last session crashed');
|
|
||||||
LoggerProxy.error('Last session crashed');
|
LoggerProxy.error('Last session crashed');
|
||||||
// add a 10 seconds pause to slow down crash-looping
|
// add a 10 seconds pause to slow down crash-looping
|
||||||
await sleep(10_000);
|
await sleep(10_000);
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import * as ErrorReporter from './ErrorReporterProxy';
|
|
||||||
|
|
||||||
export type Primitives = string | number | boolean | bigint | symbol | null | undefined;
|
export type Primitives = string | number | boolean | bigint | symbol | null | undefined;
|
||||||
|
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument */
|
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument */
|
||||||
|
@ -19,9 +17,6 @@ export const deepCopy = <T extends ((object | Date) & { toJSON?: () => string })
|
||||||
return source.toJSON() as T;
|
return source.toJSON() as T;
|
||||||
}
|
}
|
||||||
if (hash.has(source)) {
|
if (hash.has(source)) {
|
||||||
ErrorReporter.warn('Circular reference detected', {
|
|
||||||
extra: { source, path },
|
|
||||||
});
|
|
||||||
return hash.get(source);
|
return hash.get(source);
|
||||||
}
|
}
|
||||||
// Array
|
// Array
|
||||||
|
|
Loading…
Reference in a new issue