refactor(core): Remove a floating promise

This commit is contained in:
Jan Oberhauser 2022-06-04 12:33:49 +02:00
parent 3806d6355d
commit eb766e2ced

View file

@ -135,14 +135,25 @@ 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) => {
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' &&