feat(core): Add optional Error-Output (#7460)
Add an additional optional error output to which all items get sent that could not be processed.  Github issue / Community forum post (link here to close automatically): https://community.n8n.io/t/error-connector-for-nodes/3094 https://community.n8n.io/t/error-handling-at-node-level-detect-node-execution-status/26791 --------- Co-authored-by: OlegIvaniv <me@olegivaniv.com>
This commit is contained in:
@@ -371,7 +371,7 @@ export default defineComponent({
|
||||
alwaysOutputData: false,
|
||||
executeOnce: false,
|
||||
notesInFlow: false,
|
||||
continueOnFail: false,
|
||||
onError: 'stopWorkflow',
|
||||
retryOnFail: false,
|
||||
maxTries: 3,
|
||||
waitBetweenTries: 1000,
|
||||
@@ -440,12 +440,39 @@ export default defineComponent({
|
||||
description: this.$locale.baseText('nodeSettings.waitBetweenTries.description'),
|
||||
},
|
||||
{
|
||||
displayName: this.$locale.baseText('nodeSettings.continueOnFail.displayName'),
|
||||
name: 'continueOnFail',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
displayName: this.$locale.baseText('nodeSettings.onError.displayName'),
|
||||
name: 'onError',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: this.$locale.baseText('nodeSettings.onError.options.stopWorkflow.displayName'),
|
||||
value: 'stopWorkflow',
|
||||
description: this.$locale.baseText(
|
||||
'nodeSettings.onError.options.stopWorkflow.description',
|
||||
),
|
||||
},
|
||||
{
|
||||
name: this.$locale.baseText(
|
||||
'nodeSettings.onError.options.continueRegularOutput.displayName',
|
||||
),
|
||||
value: 'continueRegularOutput',
|
||||
description: this.$locale.baseText(
|
||||
'nodeSettings.onError.options.continueRegularOutput.description',
|
||||
),
|
||||
},
|
||||
{
|
||||
name: this.$locale.baseText(
|
||||
'nodeSettings.onError.options.continueErrorOutput.displayName',
|
||||
),
|
||||
value: 'continueErrorOutput',
|
||||
description: this.$locale.baseText(
|
||||
'nodeSettings.onError.options.continueErrorOutput.description',
|
||||
),
|
||||
},
|
||||
],
|
||||
default: 'stopWorkflow',
|
||||
noDataExpression: true,
|
||||
description: this.$locale.baseText('nodeSettings.continueOnFail.description'),
|
||||
description: this.$locale.baseText('nodeSettings.onError.description'),
|
||||
},
|
||||
{
|
||||
displayName: this.$locale.baseText('nodeSettings.notes.displayName'),
|
||||
@@ -633,6 +660,11 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
if (parameterData.name === 'onError') {
|
||||
// If that parameter changes, we need to redraw the connections, as the error output may need to be added or removed
|
||||
this.$emit('redrawRequired');
|
||||
}
|
||||
|
||||
if (parameterData.name === 'name') {
|
||||
// Name of node changed so we have to set also the new node name as active
|
||||
|
||||
@@ -880,10 +912,18 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
if (this.node.continueOnFail) {
|
||||
foundNodeSettings.push('continueOnFail');
|
||||
foundNodeSettings.push('onError');
|
||||
this.nodeValues = {
|
||||
...this.nodeValues,
|
||||
continueOnFail: this.node.continueOnFail,
|
||||
onError: 'continueRegularOutput',
|
||||
};
|
||||
}
|
||||
|
||||
if (this.node.onError) {
|
||||
foundNodeSettings.push('onError');
|
||||
this.nodeValues = {
|
||||
...this.nodeValues,
|
||||
onError: this.node.onError,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user