fix(proxy/utils.py): raise exception if get data for tokens is called on None token

This commit is contained in:
Krrish Dholakia 2024-02-23 14:44:33 -08:00
parent 308c73fca9
commit 1e769bcb77

View file

@ -554,6 +554,11 @@ class PrismaClient:
f"PrismaClient: find_unique for token: {hashed_token}"
)
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(
where={"token": hashed_token}
)