diff --git a/documentation/DeploymentGuide.md b/documentation/DeploymentGuide.md index 420bfe90..104bba8a 100644 --- a/documentation/DeploymentGuide.md +++ b/documentation/DeploymentGuide.md @@ -182,7 +182,7 @@ Once you've opened the project in [Codespaces](#github-codespaces), [Dev Contain 3. Provide an `azd` environment name (e.g., "macaeapp"). 4. Select a subscription from your Azure account and choose a location that has quota for all the resources. - - This deployment will take _4-6 minutes_ to provision the resources in your account and set up the solution with sample data. + - The default deployment will take _4-6 minutes_ to provision the resources in your account and set up the solution with sample data. The WAF aligned deployment will take between _25-45 minuntes_. - If you encounter an error or timeout during deployment, changing the location may help, as there could be availability constraints for the resources. 5. Once the deployment has completed successfully, open the [Azure Portal](https://portal.azure.com/), go to the deployed resource group, find the App Service, and get the app URL from `Default domain`. diff --git a/src/backend/app_kernel.py b/src/backend/app_kernel.py index 5275f7ad..7b76c22d 100644 --- a/src/backend/app_kernel.py +++ b/src/backend/app_kernel.py @@ -185,7 +185,7 @@ async def input_task_endpoint(input_task: InputTask, request: Request): "error": str(e), }, ) - raise HTTPException(status_code=400, detail="Error creating plan") + raise HTTPException(status_code=400, detail=f"Error creating plan: {e}") @app.post("/api/human_feedback") diff --git a/src/backend/kernel_agents/planner_agent.py b/src/backend/kernel_agents/planner_agent.py index a8063fe7..cfc2119d 100644 --- a/src/backend/kernel_agents/planner_agent.py +++ b/src/backend/kernel_agents/planner_agent.py @@ -434,7 +434,13 @@ async def _create_structured_plan( return plan, steps except Exception as e: - logging.exception(f"Error creating structured plan: {e}") + error_message = str(e) + if "Rate limit is exceeded" in error_message: + logging.warning("Rate limit hit. Consider retrying after some delay.") + raise + else: + logging.exception(f"Error creating structured plan: {e}") + # Create a fallback dummy plan when parsing fails logging.info("Creating fallback dummy plan due to parsing error") diff --git a/src/frontend/wwwroot/home/home.js b/src/frontend/wwwroot/home/home.js index 00cd0475..dd182879 100644 --- a/src/frontend/wwwroot/home/home.js +++ b/src/frontend/wwwroot/home/home.js @@ -103,6 +103,16 @@ }) .then((response) => response.json()) .then((data) => { + // Check if 'detail' field contains rate limit error + if (data.detail && data.detail.includes("Rate limit is exceeded")) { + notyf.error("Application temporarily unavailable due to quota limits. Please try again later."); + newTaskPrompt.disabled = false; + startTaskButton.disabled = false; + startTaskButton.classList.remove("is-loading"); + hideOverlay(); + return; + } + if (data.status == "Plan not created" || data.plan_id == "") { notyf.error("Unable to create plan for this task."); newTaskPrompt.disabled = false;