diff --git a/src/Formatters/HttpExceptionFormatter.php b/src/Formatters/HttpExceptionFormatter.php index 8eec9aa..57f6297 100644 --- a/src/Formatters/HttpExceptionFormatter.php +++ b/src/Formatters/HttpExceptionFormatter.php @@ -11,6 +11,10 @@ class HttpExceptionFormatter extends ExceptionFormatter public function format(JsonResponse $response, Exception $e, array $reporterResponses) { parent::format($response, $e, $reporterResponses); + + if (count($headers = $e->getHeaders())) { + $response->headers->add($headers); + } $response->setStatusCode($e->getStatusCode()); }