Remove status check when ending workflow (#10299)
Should be possible to end workflow, not matter what the current status is. On failure before the workflow was started, this error prevent the workflow to be marked as failed with the right error message.
This commit is contained in:
@ -113,13 +113,6 @@ export class WorkflowRunWorkspaceService {
|
||||
);
|
||||
}
|
||||
|
||||
if (workflowRunToUpdate.status !== WorkflowRunStatus.RUNNING) {
|
||||
throw new WorkflowRunException(
|
||||
'Workflow cannot be ended as it is not running',
|
||||
WorkflowRunExceptionCode.INVALID_OPERATION,
|
||||
);
|
||||
}
|
||||
|
||||
return workflowRunRepository.update(workflowRunToUpdate.id, {
|
||||
status,
|
||||
endedAt: new Date().toISOString(),
|
||||
|
||||
Reference in New Issue
Block a user