feat: validate step input in executeFlow
This commit is contained in:
@@ -13,11 +13,13 @@ const executeFlow = async (
|
|||||||
context: Context
|
context: Context
|
||||||
) => {
|
) => {
|
||||||
const { stepId } = params.input;
|
const { stepId } = params.input;
|
||||||
const { executionStep } = await testRun({ stepId });
|
|
||||||
|
|
||||||
const untilStep = await context.currentUser
|
const untilStep = await context.currentUser
|
||||||
.$relatedQuery('steps')
|
.$relatedQuery('steps')
|
||||||
.findById(stepId);
|
.findById(stepId)
|
||||||
|
.throwIfNotFound();
|
||||||
|
|
||||||
|
const { executionStep } = await testRun({ stepId });
|
||||||
|
|
||||||
if (executionStep.isFailed) {
|
if (executionStep.isFailed) {
|
||||||
throw new Error(JSON.stringify(executionStep.errorDetails));
|
throw new Error(JSON.stringify(executionStep.errorDetails));
|
||||||
|
Reference in New Issue
Block a user