diff --git a/packages/cli/src/WorkflowExecuteAdditionalData.ts b/packages/cli/src/WorkflowExecuteAdditionalData.ts index 570baf536b..a03574752c 100644 --- a/packages/cli/src/WorkflowExecuteAdditionalData.ts +++ b/packages/cli/src/WorkflowExecuteAdditionalData.ts @@ -438,14 +438,8 @@ function hookFunctionsSaveWorker(): IWorkflowExecuteHooks { } } - // Check config to know if execution should be saved or not - let saveDataErrorExecution = config.get('executions.saveDataOnError') as string; - if (this.workflowData.settings !== undefined) { - saveDataErrorExecution = (this.workflowData.settings.saveDataErrorExecution as string) || saveDataErrorExecution; - } - const workflowDidSucceed = !fullRunData.data.resultData.error; - if (workflowDidSucceed === false && saveDataErrorExecution === 'none') { + if (workflowDidSucceed === false) { executeErrorWorkflow(this.workflowData, fullRunData, this.mode, undefined, this.retryOf); } @@ -473,7 +467,6 @@ function hookFunctionsSaveWorker(): IWorkflowExecuteHooks { if (fullRunData.finished === true && this.retryOf !== undefined) { // If the retry was successful save the reference it on the original execution - // await Db.collections.Execution!.save(executionData as IExecutionFlattedDb); await Db.collections.Execution!.update(this.retryOf, { retrySuccessId: this.executionId }); } } catch (error) {