fix: mark step completed only when successful
This commit is contained in:
@@ -19,14 +19,14 @@ const executeFlow = async (
|
||||
.$relatedQuery('steps')
|
||||
.findById(stepId);
|
||||
|
||||
await untilStep.$query().patch({
|
||||
status: 'completed',
|
||||
});
|
||||
|
||||
if (executionStep.isFailed) {
|
||||
throw new Error(JSON.stringify(executionStep.errorDetails));
|
||||
}
|
||||
|
||||
await untilStep.$query().patch({
|
||||
status: 'completed',
|
||||
});
|
||||
|
||||
return { data: executionStep.dataOut, step: untilStep };
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user