Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/backend/app_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
# Add this near the top of your app.py, after initializing the app
app.add_middleware(
CORSMiddleware,
allow_origins=[frontend_url],
allow_origins=[frontend_url], # Allow all origins for development; restrict in production
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
Expand Down Expand Up @@ -269,7 +269,7 @@ async def input_task_endpoint(input_task: InputTask, request: Request):
if "Rate limit is exceeded" in error_msg:
match = re.search(r"Rate limit is exceeded\. Try again in (\d+) seconds?\.", error_msg)
if match:
error_msg = f"Rate limit is exceeded. Try again in {match.group(1)} seconds."
error_msg = "Application temporarily unavailable due to quota limits. Please try again later."

track_event_if_configured(
"InputTaskError",
Expand All @@ -279,7 +279,7 @@ async def input_task_endpoint(input_task: InputTask, request: Request):
"error": str(e),
},
)
raise HTTPException(status_code=400, detail=f"Error creating plan: {error_msg}") from e
raise HTTPException(status_code=400, detail=f"{error_msg}") from e


@app.post("/api/human_feedback")
Expand Down
Loading