2
0

fix(engine): 🐛 Code block should never crash bot

This commit is contained in:
Baptiste Arnaud
2022-05-17 13:56:41 -07:00
parent fbcd46dd9c
commit 0beb2e6619

View File

@ -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
}