Auto-start workflow if one isn't found to get rid of startup error

This commit is contained in:
Laine
2025-03-12 10:20:27 -04:00
parent b52cef0d05
commit 0306a5d726
2 changed files with 10 additions and 4 deletions

View File

@@ -113,6 +113,10 @@ async def get_conversation_history():
status_code=404, detail="Workflow worker unavailable or not found." status_code=404, detail="Workflow worker unavailable or not found."
) )
if "workflow not found" in error_message:
await start_workflow()
return []
else:
# For other Temporal errors, return a 500 # For other Temporal errors, return a 500
raise HTTPException( raise HTTPException(
status_code=500, detail="Internal server error while querying workflow." status_code=500, detail="Internal server error while querying workflow."

View File

@@ -34,3 +34,5 @@
[ ] non-retry the api key error - "Invalid API Key provided: sk_test_**J..." and "AuthenticationError" [ ] non-retry the api key error - "Invalid API Key provided: sk_test_**J..." and "AuthenticationError"
[ ] make it so you can yeet yourself out of a goal and pick a new one [ ] make it so you can yeet yourself out of a goal and pick a new one
[ ] add visual feedback when workflow starting