From 137ec1631baccbb6d94c0358e89a06e7f29468c5 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 19 Mar 2022 02:57:50 +0400 Subject: [PATCH 1/2] feat: added comment about rethrowing PDO exception --- app/controllers/general.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/general.php b/app/controllers/general.php index c08c244b31..ecf75e5d32 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -321,6 +321,7 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project, $l $version = App::getEnv('_APP_VERSION', 'UNKNOWN'); $route = $utopia->match($request); + /** Rethrow PDO exceptions so the database connection can be returned to the pool correctly */ if ($error instanceof PDOException) { throw $error; } From 0feb4a1008968c6ccc170626c61cb4cc0462f113 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sat, 19 Mar 2022 02:58:54 +0400 Subject: [PATCH 2/2] feat: added comment about rethrowing PDO exception --- app/controllers/general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index ecf75e5d32..a65e07c81c 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -321,7 +321,7 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project, $l $version = App::getEnv('_APP_VERSION', 'UNKNOWN'); $route = $utopia->match($request); - /** Rethrow PDO exceptions so the database connection can be returned to the pool correctly */ + /** Delegate PDO exceptions to the global handler so the database connection can be returned to the pool */ if ($error instanceof PDOException) { throw $error; }