From 21ef33ea45fd34741e5a2e1bcc04a33ab593b10c Mon Sep 17 00:00:00 2001 From: shimon Date: Mon, 1 Dec 2025 11:34:09 +0200 Subject: [PATCH] debug --- app/controllers/api/health.php | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 68324aeb96..d573d230b8 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -124,26 +124,16 @@ App::get('/v1/health/db') ]); } else { $failures[] = $database; - // Add failure to output instead of throwing - $output[] = new Document([ - 'name' => $key . " ($database)", - 'status' => 'fail', - 'ping' => 0 - ]); } - } catch (\Throwable $e) { + } catch (\Throwable) { + var_dump($key . " ($database)",); $failures[] = $database; - // Add failure to output instead of throwing - $output[] = new Document([ - 'name' => $key . " ($database)", - 'status' => 'fail', - 'ping' => 0 - ]); } } } - + if (!empty($failures)) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, 'DB failure on: ' . implode(", ", $failures)); }