Skip to content

Commit f5f8cb7

Browse files
rate limit error message change
1 parent 15b8fbf commit f5f8cb7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/app_kernel.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
# Add this near the top of your app.py, after initializing the app
7575
app.add_middleware(
7676
CORSMiddleware,
77-
allow_origins=[frontend_url],
77+
allow_origins=[frontend_url], # Allow all origins for development; restrict in production
7878
allow_credentials=True,
7979
allow_methods=["*"],
8080
allow_headers=["*"],
@@ -269,7 +269,7 @@ async def input_task_endpoint(input_task: InputTask, request: Request):
269269
if "Rate limit is exceeded" in error_msg:
270270
match = re.search(r"Rate limit is exceeded\. Try again in (\d+) seconds?\.", error_msg)
271271
if match:
272-
error_msg = f"Rate limit is exceeded. Try again in {match.group(1)} seconds."
272+
error_msg = "Application temporarily unavailable due to quota limits. Please try again later."
273273

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

284284

285285
@app.post("/api/human_feedback")

0 commit comments

Comments
 (0)