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:
agobrech 2023-01-31 09:25:08 +01:00 committed by GitHub
parent c6bc57b4cb
commit a8637a0bc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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