diff --git a/backend/routers/prompts.py b/backend/routers/prompts.py index 734f7a2..fcd524d 100644 --- a/backend/routers/prompts.py +++ b/backend/routers/prompts.py @@ -1562,13 +1562,13 @@ async def execute_unified_prompt_stream( conn.commit() except Exception as e: - # Queue error event - await event_queue.put({ - "type": "execution_failed", - "error": str(e) - }) - finally: - execution_complete = True + # Queue error event + await event_queue.put({ + "type": "execution_failed", + "error": str(e) + }) + finally: + execution_complete = True # Start workflow execution in background import asyncio