mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Error reporter should log all error on an error-chain (no-changelog) (#5342)
This commit is contained in:
committed by
GitHub
parent
6985500a7d
commit
51b560b3f4
@@ -12,8 +12,15 @@ interface ErrorReporter {
|
||||
}
|
||||
|
||||
const instance: ErrorReporter = {
|
||||
report: (error) =>
|
||||
error instanceof Error && Logger.error(`${error.constructor.name}: ${error.message}`),
|
||||
report: (error) => {
|
||||
if (error instanceof Error) {
|
||||
let e = error;
|
||||
do {
|
||||
Logger.error(`${e.constructor.name}: ${e.message}`);
|
||||
e = e.cause as Error;
|
||||
} while (e);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export function init(errorReporter: ErrorReporter) {
|
||||
|
||||
Reference in New Issue
Block a user