Skip to content

Commit

Permalink
fix(cli): catch errors on updating workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mieky committed Sep 13, 2022
1 parent 36ec81f commit bfa8165
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,13 @@ export = {
await workflowRunner.remove(id.toString());
}

await updateWorkflow(sharedWorkflow.workflowId, updateData);
try {
await updateWorkflow(sharedWorkflow.workflowId, updateData);
} catch (error) {
if (error instanceof Error) {
return res.status(400).json({ message: error.message });
}
}

if (sharedWorkflow.workflow.active) {
try {
Expand Down

0 comments on commit bfa8165

Please sign in to comment.