feat: more helpful error

This commit is contained in:
julius 2025-03-26 17:36:52 +01:00
parent ee13d06ab1
commit bef5119a0b
Signed by: julius
GPG Key ID: C80A63E6A5FD7092

View File

@ -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})