mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Improve handling of wrapped errors (#8510)
This commit is contained in:
committed by
GitHub
parent
f1910a10a6
commit
670af167e6
@@ -39,12 +39,15 @@ export abstract class NodeError extends ExecutionBaseError {
|
||||
readonly node: INode,
|
||||
error: Error | JsonObject,
|
||||
) {
|
||||
if (error instanceof NodeError) return error;
|
||||
|
||||
const isError = error instanceof Error;
|
||||
const message = isError ? error.message : '';
|
||||
const options = isError ? { cause: error } : { errorResponse: error };
|
||||
super(message, options);
|
||||
|
||||
if (error instanceof NodeError) {
|
||||
this.level = 'error';
|
||||
this.message = `[RE-WRAPPED]: ${message}`;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user