Skip to content

Commit

Permalink
fix(engine): 🐛 Code block should never crash bot
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed May 17, 2022
1 parent fbcd46d commit 0beb2e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/bot-engine/src/services/logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ const executeCode = async (
...variables.map((v) => v.id),
parseVariables(variables, { fieldToParse: 'id' })(step.options.content)
)
await func(...variables.map((v) => v.value))
try {
await func(...variables.map((v) => v.value))
} catch (err) {
console.error(err)
}
return step.outgoingEdgeId
}

Expand Down

4 comments on commit 0beb2e6

@vercel
Copy link

@vercel vercel bot commented on 0beb2e6 May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app
app.typebot.io

@vercel
Copy link

@vercel vercel bot commented on 0beb2e6 May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 0beb2e6 May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.