Skip to content

Commit

Permalink
fixup! Refactored previewAction controller to improve error response (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
vidarl committed Oct 17, 2024
1 parent e322ffa commit 64aedb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/MVC/Symfony/Controller/Content/PreviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(

Check failure on line 138 in src/lib/MVC/Symfony/Controller/Content/PreviewController.php

View workflow job for this annotation

GitHub Actions / Unit tests & SQLite integration tests (7.4)

Cannot call method warning() on Psr\Log\LoggerInterface|null.

Check failure on line 138 in src/lib/MVC/Symfony/Controller/Content/PreviewController.php

View workflow job for this annotation

GitHub Actions / Unit tests & SQLite integration tests (8.1)

Cannot call method warning() on Psr\Log\LoggerInterface|null.

Check failure on line 138 in src/lib/MVC/Symfony/Controller/Content/PreviewController.php

View workflow job for this annotation

GitHub Actions / Unit tests & SQLite integration tests (8.0)

Cannot call method warning() on Psr\Log\LoggerInterface|null.
'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) {
Expand Down

0 comments on commit 64aedb4

Please sign in to comment.