improver error handling
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 8s

This commit is contained in:
2025-12-18 21:45:43 +01:00
parent 9afe49857a
commit a2a017f900
7 changed files with 52 additions and 38 deletions

View File

@@ -353,7 +353,7 @@ def full_state(
@router.post("/bridge/create")
def create_bridge(req: BridgeCreateRequest, ip: IPRoute = Depends(get_iproute)):
if bridge_exists(req.name, ip):
raise HTTPException(400, f"Bridge {req.name} already exists")
raise HTTPException(400, detail=f"Bridge {req.name} already exists")
# Bridge erzeugen
ip.link("add", ifname=req.name, kind="bridge")