diff --git a/packages/bot-engine/src/forge/executeForgedBlock.ts b/packages/bot-engine/src/forge/executeForgedBlock.ts index 4a3606c22..52bcaf1e8 100644 --- a/packages/bot-engine/src/forge/executeForgedBlock.ts +++ b/packages/bot-engine/src/forge/executeForgedBlock.ts @@ -27,6 +27,15 @@ export const executeForgedBlock = async ( const blockDef = forgedBlocks[block.type]; if (!blockDef) return { outgoingEdgeId: block.outgoingEdgeId }; const action = blockDef.actions.find((a) => a.name === block.options.action); + if (!block.options || !action) + return { + outgoingEdgeId: block.outgoingEdgeId, + logs: [ + { + description: `${block.type} is not configured`, + }, + ], + }; const noCredentialsError = { status: "error", description: "Credentials not provided for integration",