mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
`is_database_connection_error` answered True for any `PrismaError` it did not recognize, on the reasoning that an unclassified failure might be an outage and the safer default was to keep serving. That default is inverted for faults that never resolve. A query engine that is missing or version-skewed, a malformed generated query, or a misused transaction all satisfied the predicate, so with `allow_requests_on_db_unavailable` enabled the proxy would absorb one, boot clean, and keep issuing fallback identities for as long as the process ran. The predicate is now an allowlist: the httpx transport errors, prisma's `EngineConnectionError`, and a `no_db_connection` ProxyException. That is what a real outage produces, since the query engine is a local HTTP server and an unreachable database surfaces as a transport failure against it, so the high-availability path is unchanged. Anything unrecognized is now treated as permanent and surfaces instead of being absorbed. Deciding whether to serve without a database and deciding what to tell the caller are different questions, so they no longer share a predicate. `is_database_infrastructure_error` keeps the previous broad behavior and now backs the reporting and recovery paths: service-unavailable classification, the access-group endpoint's status mapping, and the health watchdog's reconnect trigger. Their behavior is unchanged. Without that split, a permanently faulted engine would have started reporting as an authentication failure, sending an operator after a credential problem that does not exist. |
||
|---|---|---|
| .. | ||
| db_transaction_queue | ||
| mcp_server | ||
| conftest.py | ||
| test_autorouter_session_rollup.py | ||
| test_check_migration.py | ||
| test_create_views.py | ||
| test_db_spend_update_writer.py | ||
| test_db_url_settings.py | ||
| test_exception_handler.py | ||
| test_exception_handler_reconnect_retry.py | ||
| test_gateway_request_tracking.py | ||
| test_prisma_client.py | ||
| test_prisma_planned_engine_restart.py | ||
| test_prisma_self_heal.py | ||
| test_query_engine_reaper.py | ||
| test_rds_iam_token_expiry.py | ||
| test_replica_identity.py | ||
| test_routing_prisma_wrapper.py | ||
| test_spend_log_batching.py | ||
| test_spend_log_tool_index.py | ||
| test_tool_registry_writer.py | ||