From b4277ab28dacb970f3e049883ad46777e52a8e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 11 Sep 2020 10:37:32 +0200 Subject: [PATCH] Do not handle exceptions from page controller in the ExceptionMiddleware MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Middleware/ExceptionMiddleware.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Middleware/ExceptionMiddleware.php b/lib/Middleware/ExceptionMiddleware.php index c02eab8c1..0d4cd7feb 100644 --- a/lib/Middleware/ExceptionMiddleware.php +++ b/lib/Middleware/ExceptionMiddleware.php @@ -23,6 +23,7 @@ namespace OCA\Deck\Middleware; +use OCA\Deck\Controller\PageController; use OCA\Deck\StatusException; use OCA\Deck\Exceptions\ConflictException; use OCP\AppFramework\Db\DoesNotExistException; @@ -62,6 +63,10 @@ class ExceptionMiddleware extends Middleware { * @throws \Exception */ public function afterException($controller, $methodName, \Exception $exception) { + if (get_class($controller) === PageController::class) { + throw $exception; + } + if ($exception instanceof ConflictException) { if ($this->config->getSystemValue('loglevel', Util::WARN) === Util::DEBUG) { $this->logger->logException($exception);