This commit is contained in:
shimon 2025-12-01 11:34:09 +02:00
parent 5b2fdf7e5b
commit 21ef33ea45

View file

@ -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));
}