Skip to content

Commit 45cd804

Browse files
authored
Call prepare() on error responses (#43895)
1 parent b32808d commit 45cd804

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Foundation/Exceptions/Handler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ protected function shouldReturnJson($request, Throwable $e)
530530
protected function prepareResponse($request, Throwable $e)
531531
{
532532
if (! $this->isHttpException($e) && config('app.debug')) {
533-
return $this->toIlluminateResponse($this->convertExceptionToResponse($e), $e);
533+
return $this->toIlluminateResponse($this->convertExceptionToResponse($e), $e)->prepare($request);
534534
}
535535

536536
if (! $this->isHttpException($e)) {
@@ -539,7 +539,7 @@ protected function prepareResponse($request, Throwable $e)
539539

540540
return $this->toIlluminateResponse(
541541
$this->renderHttpException($e), $e
542-
);
542+
)->prepare($request);
543543
}
544544

545545
/**

0 commit comments

Comments
 (0)