diff --git a/litellm/proxy/db/exception_handler.py b/litellm/proxy/db/exception_handler.py index 13a14e95e56..c1be5732421 100644 --- a/litellm/proxy/db/exception_handler.py +++ b/litellm/proxy/db/exception_handler.py @@ -220,6 +220,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 _prisma_error_code(e) == "P1017": diff --git a/tests/unit/proxy/db/test_exception_handler.py b/tests/unit/proxy/db/test_exception_handler.py index d70d4403962..3aafde46748 100644 --- a/tests/unit/proxy/db/test_exception_handler.py +++ b/tests/unit/proxy/db/test_exception_handler.py @@ -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():