From bef5119a0b0a42ea4cc04dc3529fba41e46666af Mon Sep 17 00:00:00 2001
From: julius <julius@0124816.xyz>
Date: Wed, 26 Mar 2025 17:36:52 +0100
Subject: [PATCH] feat: more helpful error

---
 cutt/analysis.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cutt/analysis.py b/cutt/analysis.py
index 5bf7362..4d4876d 100644
--- a/cutt/analysis.py
+++ b/cutt/analysis.py
@@ -70,7 +70,10 @@ def graph_json(
             .where(Team.id == request.team_id, P.disabled == False)
         ).all()
         if not players:
-            raise HTTPException(status_code=status.HTTP_404_NOT_FOUND)
+            raise HTTPException(
+                status_code=status.HTTP_404_NOT_FOUND,
+                detail="no players found in your team",
+            )
         for p in players:
             player_map[p.id] = p.display_name
             nodes.append({"id": p.display_name, "label": p.display_name})