File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 7474# Add this near the top of your app.py, after initializing the app
7575app .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" )
You can’t perform that action at this time.
0 commit comments