diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index d498638e336a..93a67a5524ec 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -7819,6 +7819,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,