fix(core): Improve model sub-nodes error handling (#11418)

This commit is contained in:
Eugene
2024-11-08 10:17:11 +01:00
committed by GitHub
parent b496bf3147
commit 57467d0285
24 changed files with 310 additions and 56 deletions

View File

@@ -40,7 +40,6 @@ export class ExpressionError extends ExecutionBaseError {
'causeDetailed',
'descriptionTemplate',
'descriptionKey',
'functionality',
'itemIndex',
'messageTemplate',
'nodeCause',
@@ -48,7 +47,12 @@ export class ExpressionError extends ExecutionBaseError {
'runIndex',
'type',
];
if (options !== undefined) {
if (options.functionality !== undefined) {
this.functionality = options.functionality;
}
Object.keys(options as IDataObject).forEach((key) => {
if (allowedKeys.includes(key)) {
this.context[key] = (options as IDataObject)[key];

View File

@@ -261,7 +261,7 @@ export class NodeApiError extends NodeError {
messageMapping,
);
if (functionality !== undefined) this.context.functionality = functionality;
if (functionality !== undefined) this.functionality = functionality;
if (runIndex !== undefined) this.context.runIndex = runIndex;
if (itemIndex !== undefined) this.context.itemIndex = itemIndex;
}