mirror of
https://github.com/appwrite/appwrite
synced 2026-05-19 15:08:43 +00:00
tmp debug health db api
This commit is contained in:
parent
cf6605746d
commit
5b2fdf7e5b
1 changed files with 14 additions and 2 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue