Skip to content

Commit

Permalink
Use render function so the HTML contains the CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
AliceKLWilliams committed Mar 21, 2024
1 parent b61a520 commit 1ab0d6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public function report(Exception $e)

public function render(ServerRequestInterface $request, Exception $e) : ResponseInterface
{
$e = FlattenException::create($e);

$htmlRenderer = new HtmlErrorRenderer(Config::get('app.debug', false));

return new HtmlResponse($htmlRenderer->getBody($e), $e->getStatusCode(), $e->getHeaders());
$exception = $htmlRenderer->render($e);

return new HtmlResponse($exception->getAsString(), $exception->getStatusCode(), $exception->getHeaders());
}

protected function shouldNotReport(Exception $e)
Expand Down

0 comments on commit 1ab0d6e

Please sign in to comment.