From 333386ac8b74d350ab0c9f86409f9dfe6233b51a Mon Sep 17 00:00:00 2001 From: grossmj Date: Wed, 18 Mar 2026 16:08:47 +0800 Subject: [PATCH] Use status.HTTP_501_NOT_IMPLEMENTED from FastAPI --- gns3server/api/routes/controller/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/api/routes/controller/__init__.py b/gns3server/api/routes/controller/__init__.py index d48993de6..3345a654c 100644 --- a/gns3server/api/routes/controller/__init__.py +++ b/gns3server/api/routes/controller/__init__.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from fastapi import APIRouter, Depends, HTTPException +from fastapi import APIRouter, Depends, HTTPException, status # Check AI Copilot availability from gns3server.agent import AI_COPILOT_AVAILABLE @@ -34,7 +34,7 @@ else: @_llm_router.api_route("/{path:path}", methods=["GET", "POST", "DELETE", "PATCH", "PUT"]) async def ai_not_available(path: str = ""): raise HTTPException( - status_code=501, + status_code=status.HTTP_501_NOT_IMPLEMENTED, detail="AI Copilot is not available. Install AI dependencies with: pip install gns3-server[ai-copilot]" )