From 64aedb42aad1988e36bc829c4b4ff84981159c7f Mon Sep 17 00:00:00 2001 From: Vidar Langseid Date: Thu, 17 Oct 2024 14:35:48 +0200 Subject: [PATCH] fixup! Refactored previewAction controller to improve error response (#404) --- src/lib/MVC/Symfony/Controller/Content/PreviewController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/MVC/Symfony/Controller/Content/PreviewController.php b/src/lib/MVC/Symfony/Controller/Content/PreviewController.php index 80f5d77b0e..a54454ebd5 100644 --- a/src/lib/MVC/Symfony/Controller/Content/PreviewController.php +++ b/src/lib/MVC/Symfony/Controller/Content/PreviewController.php @@ -134,9 +134,9 @@ public function previewContentAction( false ); } catch (APINotFoundException $e) { - $message = 'Location not found or not available in requested language'; + $message = sprintf('Location (%s) not found or not available in requested language (%s)', $location->id, $language); $this->logger->warning( - 'Location not found or not available in requested language when loading the preview page', + sprintf('%s %s', $message, 'when loading the preview page'), ['exception' => $e] ); if ($this->debugMode) {