Refactor health check logic to simplify database failure handling

This commit is contained in:
shimon 2025-12-02 12:58:55 +02:00
parent b5537bb714
commit 7041cae48c

View file

@ -133,7 +133,7 @@ App::get('/v1/health/db')
// Only throw error if ALL databases failed (no successful pings)
// This allows partial failures in environments where not all DBs are ready
if (!empty($failures) && empty($output)) {
if (!empty($failures)) {
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'DB failure on: ' . implode(", ", $failures));
}