From f574127bc46d8e5f5f207787b002ab8bdb11d5ae Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 20 May 2024 17:14:03 -0700 Subject: [PATCH] fix - raise 404 when team does not exist --- litellm/proxy/proxy_server.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 351984c2b8cb..a92a25997dd6 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -7744,6 +7744,12 @@ async def team_info( team_info = await prisma_client.get_data( team_id=team_id, table_name="team", query_type="find_unique" ) + if team_info is None: + raise HTTPException( + status_code=status.HTTP_404_NOT_FOUND, + detail={"message": f"Team not found, passed team id: {team_id}."}, + ) + ## GET ALL KEYS ## keys = await prisma_client.get_data( team_id=team_id,