diff --git a/litellm/proxy/db/exception_handler.py b/litellm/proxy/db/exception_handler.py index c2d58512fea..aaec9d0e194 100644 --- a/litellm/proxy/db/exception_handler.py +++ b/litellm/proxy/db/exception_handler.py @@ -257,6 +257,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 abc0850194d..7f63d513a26 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():