mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-14 09:03:16 +00:00
fix(proxy/db): classify prisma engine internal error as transport error to trigger reconnect
This commit is contained in:
parent
d34ad35281
commit
0402fffff7
2 changed files with 3 additions and 0 deletions
|
|
@ -203,6 +203,8 @@ class PrismaDBExceptionHandler:
|
|||
),
|
||||
):
|
||||
return True
|
||||
if PrismaDBExceptionHandler.is_prisma_engine_internal_error(e):
|
||||
return True
|
||||
if PrismaDBExceptionHandler.is_database_capacity_error(e):
|
||||
return False
|
||||
if isinstance(e, _exception_types(prisma.errors.PrismaError)):
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ def test_is_database_service_unavailable_error_prisma_engine_malformed_payload()
|
|||
|
||||
assert "no attribute 'get'" in str(exc_info.value)
|
||||
assert PrismaDBExceptionHandler.is_database_service_unavailable_error(exc_info.value) is True
|
||||
assert PrismaDBExceptionHandler.is_database_transport_error(exc_info.value) is True
|
||||
|
||||
|
||||
def test_is_prisma_engine_internal_error_excludes_application_attributeerror():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue