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 cc841e6 commit e322ffa
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 @@ -140,7 +140,7 @@ public function previewContentAction(
['exception' => $e]
);
if ($this->debugMode) {
throw new BadStateException($message, 1, $e);
throw new BadStateException('Preview page', $message, $e);
}

return new Response($message);
Expand Down Expand Up @@ -232,7 +232,7 @@ private function buildResponseForGenericPreviewError(Location $location, Content
EOF;

if ($this->debugMode) {
throw new BadStateException($message, 1, $e);
throw new BadStateException('Preview page', $message, $e);
}

return new Response($message);
Expand Down

0 comments on commit e322ffa

Please sign in to comment.