From 7041cae48cff47ca1630a87269ee9ea22f162ab6 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 2 Dec 2025 12:58:55 +0200 Subject: [PATCH] Refactor health check logic to simplify database failure handling --- app/controllers/api/health.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 1bc0b0ee81..a7da3f1ac6 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -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)); }