diff --git a/packages/backend/src/graphql/mutations/execute-flow.ts b/packages/backend/src/graphql/mutations/execute-flow.ts index b35e4a82..5caeaa77 100644 --- a/packages/backend/src/graphql/mutations/execute-flow.ts +++ b/packages/backend/src/graphql/mutations/execute-flow.ts @@ -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 }; };