diff --git a/app/controllers/general.php b/app/controllers/general.php index e56357869..fd7599595 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -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 { diff --git a/app/http.php b/app/http.php index fe0778bb1..4d15cab30 100644 --- a/app/http.php +++ b/app/http.php @@ -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())) ? [