tmp debug health db api

This commit is contained in:
shimon 2025-12-01 11:19:25 +02:00
parent cf6605746d
commit 5b2fdf7e5b

View file

@ -124,13 +124,25 @@ 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) {
} catch (\Throwable $e) {
$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));
}