mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
is_database_connection_error
This commit is contained in:
parent
4948673e35
commit
f8caebc54b
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