mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
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:
commit
ad91bff6f7
1 changed files with 6 additions and 0 deletions
|
@ -7819,6 +7819,12 @@ async def team_info(
|
||||||
team_info = await prisma_client.get_data(
|
team_info = await prisma_client.get_data(
|
||||||
team_id=team_id, table_name="team", query_type="find_unique"
|
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 ##
|
## GET ALL KEYS ##
|
||||||
keys = await prisma_client.get_data(
|
keys = await prisma_client.get_data(
|
||||||
team_id=team_id,
|
team_id=team_id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue