mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
refactor(core): Remove a floating promise
This commit is contained in:
parent
3806d6355d
commit
eb766e2ced
|
|
@ -135,15 +135,26 @@ function executeErrorWorkflow(
|
||||||
// make sure there are no possible security gaps
|
// make sure there are no possible security gaps
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
getWorkflowOwner(workflowData.id)
|
||||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
.then((user) => {
|
||||||
getWorkflowOwner(workflowData.id).then((user) => {
|
void WorkflowHelpers.executeErrorWorkflow(
|
||||||
void WorkflowHelpers.executeErrorWorkflow(
|
workflowData.settings!.errorWorkflow as string,
|
||||||
workflowData.settings!.errorWorkflow as string,
|
workflowErrorData,
|
||||||
workflowErrorData,
|
user,
|
||||||
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 (
|
} else if (
|
||||||
mode !== 'error' &&
|
mode !== 'error' &&
|
||||||
workflowData.id !== undefined &&
|
workflowData.id !== undefined &&
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue