Merge pull request #3749 from BerriAI/litellm_raise_404_when_team_not_exist

[Fix] - raise 404 from `/team/info`  when team does not exist
This commit is contained in:
Ishaan Jaff 2024-05-20 17:52:43 -07:00 committed by GitHub
commit ad91bff6f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,