Skip to content

Commit

Permalink
Merge pull request #14 from Luddinus/patch-1
Browse files Browse the repository at this point in the history
Add headers to the Http Response
  • Loading branch information
esbenp authored Aug 5, 2017
2 parents 098f483 + ca439e3 commit 6cb406b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Formatters/HttpExceptionFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 6cb406b

Please sign in to comment.