diff --git a/litellm/proxy/management_endpoints/team_endpoints.py b/litellm/proxy/management_endpoints/team_endpoints.py index ef7893ed876..4a5faaf77a1 100644 --- a/litellm/proxy/management_endpoints/team_endpoints.py +++ b/litellm/proxy/management_endpoints/team_endpoints.py @@ -1,6 +1,7 @@ import asyncio import copy import json +import traceback import uuid from datetime import datetime, timedelta, timezone from typing import List, Optional @@ -795,6 +796,11 @@ async def team_info( return {"team_id": team_id, "team_info": team_info, "keys": keys} except Exception as e: + verbose_proxy_logger.error( + "litellm.proxy.management_endpoints.team_endpoints.py::team_info - Exception occurred - {}\n{}".format( + e, traceback.format_exc() + ) + ) if isinstance(e, HTTPException): raise ProxyException( message=getattr(e, "detail", f"Authentication Error({str(e)})"), diff --git a/litellm/tests/test_key_generate_prisma.py b/litellm/tests/test_key_generate_prisma.py index c9a09aafcb2..a74625c0ce1 100644 --- a/litellm/tests/test_key_generate_prisma.py +++ b/litellm/tests/test_key_generate_prisma.py @@ -2419,12 +2419,19 @@ async def test_create_update_team(prisma_client): ) # now hit team_info - response = await team_info( - team_id=_team_id, - http_request=Request(scope={"type": "http"}), - ) - - print("RESPONSE from team_info", response) + try: + response = await team_info( + team_id=_team_id, + http_request=Request(scope={"type": "http"}), + user_api_key_dict=UserAPIKeyAuth( + user_role=LitellmUserRoles.PROXY_ADMIN, + api_key="sk-1234", + user_id="1234", + ), + ) + except Exception as e: + print(e) + pytest.fail("Receives error - {}".format(e)) _team_info = response["team_info"] _team_info = dict(_team_info)