1
0
Fork 0
mirror of synced 2024-06-14 08:44:49 +12:00

Merge pull request #4555 from appwrite/feat-4535-remove-pdo-rethrow

Remove PDO rethrow
This commit is contained in:
Eldad A. Fux 2022-10-29 17:15:19 +03:00 committed by GitHub
commit 68d31d4ac7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 12 deletions

View file

@ -403,11 +403,6 @@ App::error()
$version = App::getEnv('_APP_VERSION', 'UNKNOWN');
$route = $utopia->match($request);
/** Delegate PDO exceptions to the global handler so the database connection can be returned to the pool */
if ($error instanceof PDOException) {
throw $error;
}
if ($logger) {
if ($error->getCode() >= 500 || $error->getCode() === 0) {
try {

View file

@ -317,13 +317,6 @@ $http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swo
Console::error('[Error] File: ' . $th->getFile());
Console::error('[Error] Line: ' . $th->getLine());
/**
* Reset Database connection if PDOException was thrown.
*/
if ($th instanceof PDOException) {
$db = null;
}
$swooleResponse->setStatusCode(500);
$output = ((App::isDevelopment())) ? [