From 76af58c646ce8e0564afff66f1a78f9f24726ee1 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Mon, 12 Jul 2021 17:27:26 +0200 Subject: [PATCH] fix(pdo): throw on general to parent --- app/controllers/general.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/general.php b/app/controllers/general.php index cd95b74a0..2a0dd7021 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -304,6 +304,10 @@ App::error(function ($error, $utopia, $request, $response, $layout, $project) { /** @var Utopia\View $layout */ /** @var Appwrite\Database\Document $project */ + if (get_class($error) == 'PDOException') { + throw $error; + } + $route = $utopia->match($request); $template = ($route) ? $route->getLabel('error', null) : null;