forked from phoenix/litellm-mirror
(feat) better debugging when reading prisma
This commit is contained in:
parent
1f15c79252
commit
b64e4c3e6f
1 changed files with 10 additions and 0 deletions
|
@ -693,6 +693,9 @@ class PrismaClient:
|
||||||
"""
|
"""
|
||||||
Generic implementation of get data
|
Generic implementation of get data
|
||||||
"""
|
"""
|
||||||
|
verbose_proxy_logger.debug(
|
||||||
|
f"PrismaClient: get_generic_data: {key}, table_name: {table_name}"
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
if table_name == "users":
|
if table_name == "users":
|
||||||
response = await self.db.litellm_usertable.find_first(
|
response = await self.db.litellm_usertable.find_first(
|
||||||
|
@ -758,6 +761,9 @@ class PrismaClient:
|
||||||
int
|
int
|
||||||
] = None, # pagination, number of rows to getch when find_all==True
|
] = None, # pagination, number of rows to getch when find_all==True
|
||||||
):
|
):
|
||||||
|
verbose_proxy_logger.debug(
|
||||||
|
f"PrismaClient: get_data: table_name: {table_name}, query_type: {query_type}, user_id: {user_id}, user_id_list: {user_id_list}, team_id: {team_id}, team_id_list: {team_id_list}, key_val: {key_val}"
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
response: Any = None
|
response: Any = None
|
||||||
if (token is not None and table_name is None) or (
|
if (token is not None and table_name is None) or (
|
||||||
|
@ -1020,6 +1026,7 @@ class PrismaClient:
|
||||||
Add a key to the database. If it already exists, do nothing.
|
Add a key to the database. If it already exists, do nothing.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
|
verbose_proxy_logger.debug(f"PrismaClient: insert_data: {data}")
|
||||||
if table_name == "key":
|
if table_name == "key":
|
||||||
token = data["token"]
|
token = data["token"]
|
||||||
hashed_token = self.hash_token(token=token)
|
hashed_token = self.hash_token(token=token)
|
||||||
|
@ -1152,6 +1159,9 @@ class PrismaClient:
|
||||||
"""
|
"""
|
||||||
Update existing data
|
Update existing data
|
||||||
"""
|
"""
|
||||||
|
verbose_proxy_logger.debug(
|
||||||
|
f"PrismaClient: update_data, table_name: {table_name}"
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
db_data = self.jsonify_object(data=data)
|
db_data = self.jsonify_object(data=data)
|
||||||
if update_key_values is not None:
|
if update_key_values is not None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue