mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
is_database_connection_error
This commit is contained in:
parent
a1e8a3c8a8
commit
43c402b8b2
3 changed files with 17 additions and 6 deletions
|
@ -144,6 +144,10 @@ class UserAPIKeyAuthExceptionHandler:
|
|||
"""
|
||||
import prisma
|
||||
|
||||
return isinstance(e, DB_CONNECTION_ERROR_TYPES) or isinstance(
|
||||
e, prisma.errors.PrismaError
|
||||
)
|
||||
if isinstance(e, DB_CONNECTION_ERROR_TYPES):
|
||||
return True
|
||||
if isinstance(e, prisma.errors.PrismaError):
|
||||
return True
|
||||
if isinstance(e, ProxyException) and e.type == ProxyErrorTypes.no_db_connection:
|
||||
return True
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue