Merge pull request #2967 from appwrite/add-comment

feat: added comment about rethrowing PDO exception
This commit is contained in:
Eldad A. Fux 2022-03-22 15:06:29 +02:00 committed by GitHub
commit 22f147279f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -321,6 +321,7 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project, $l
$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;
}