mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 20:00:02 +00:00
refactor(core): Remove a floating promise
This commit is contained in:
@@ -135,15 +135,26 @@ function executeErrorWorkflow(
|
||||
// make sure there are no possible security gaps
|
||||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
getWorkflowOwner(workflowData.id).then((user) => {
|
||||
void WorkflowHelpers.executeErrorWorkflow(
|
||||
workflowData.settings!.errorWorkflow as string,
|
||||
workflowErrorData,
|
||||
user,
|
||||
);
|
||||
});
|
||||
getWorkflowOwner(workflowData.id)
|
||||
.then((user) => {
|
||||
void WorkflowHelpers.executeErrorWorkflow(
|
||||
workflowData.settings!.errorWorkflow as string,
|
||||
workflowErrorData,
|
||||
user,
|
||||
);
|
||||
})
|
||||
.catch((error) => {
|
||||
Logger.error(
|
||||
`Could not execute ErrorWorkflow for execution ID ${this.executionId} because of error querying the workflow owner`,
|
||||
{
|
||||
executionId,
|
||||
errorWorkflowId: workflowData.settings!.errorWorkflow!.toString(),
|
||||
workflowId: workflowData.id,
|
||||
error,
|
||||
workflowErrorData,
|
||||
},
|
||||
);
|
||||
});
|
||||
} else if (
|
||||
mode !== 'error' &&
|
||||
workflowData.id !== undefined &&
|
||||
|
||||
Reference in New Issue
Block a user