mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 05:04:05 -08:00
fix(Set Node): Fix behaviour when selecting continueOnFail & PairedItem (#5257)
* 🐛 Fix bug on continueOnFail with pairedItem * 🐛 Fix pairedItem continueOnFail for the Set Node * 🎨 Add the ExpressionExtensionError back * ⚡ import fix --------- Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
parent
c6bc57b4cb
commit
a8637a0bc6
|
@ -70,6 +70,7 @@ import {
|
||||||
OAuth2GrantType,
|
OAuth2GrantType,
|
||||||
deepCopy,
|
deepCopy,
|
||||||
fileTypeFromMimeType,
|
fileTypeFromMimeType,
|
||||||
|
ExpressionError,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import { Agent } from 'https';
|
import { Agent } from 'https';
|
||||||
|
@ -1806,12 +1807,15 @@ export function getNodeParameter(
|
||||||
additionalKeys,
|
additionalKeys,
|
||||||
executeData,
|
executeData,
|
||||||
);
|
);
|
||||||
|
|
||||||
cleanupParameterData(returnData);
|
cleanupParameterData(returnData);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.context) e.context.parameter = parameterName;
|
if (e instanceof ExpressionError && node.continueOnFail && node.name === 'Set') {
|
||||||
e.cause = value;
|
returnData = [{ name: undefined, value: undefined }];
|
||||||
throw e;
|
} else {
|
||||||
|
if (e.context) e.context.parameter = parameterName;
|
||||||
|
e.cause = value;
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is outside the try/catch because it throws errors with proper messages
|
// This is outside the try/catch because it throws errors with proper messages
|
||||||
|
|
Loading…
Reference in a new issue