Skip to content

Commit

Permalink
Merge pull request #3749 from BerriAI/litellm_raise_404_when_team_not…
Browse files Browse the repository at this point in the history
…_exist

[Fix] - raise 404 from `/team/info`  when team does not exist
  • Loading branch information
ishaan-jaff committed May 21, 2024
2 parents c6bb6e3 + f574127 commit ad91bff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions litellm/proxy/proxy_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ad91bff

Please sign in to comment.