mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix(proxy/utils.py): raise exception if get data for tokens is called on None token
This commit is contained in:
parent
308c73fca9
commit
1e769bcb77
1 changed files with 5 additions and 0 deletions
|
@ -554,6 +554,11 @@ class PrismaClient:
|
||||||
f"PrismaClient: find_unique for token: {hashed_token}"
|
f"PrismaClient: find_unique for token: {hashed_token}"
|
||||||
)
|
)
|
||||||
if query_type == "find_unique":
|
if query_type == "find_unique":
|
||||||
|
if token is None:
|
||||||
|
raise HTTPException(
|
||||||
|
status_code=400,
|
||||||
|
detail={"error": f"No token passed in. Token={token}"},
|
||||||
|
)
|
||||||
response = await self.db.litellm_verificationtoken.find_unique(
|
response = await self.db.litellm_verificationtoken.find_unique(
|
||||||
where={"token": hashed_token}
|
where={"token": hashed_token}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue