Carry headers when rethrowing errors to REST

This commit is contained in:
Nabeel Shahzad
2019-08-22 12:12:44 -04:00
parent 7fdaf62ef5
commit dd2b297cc5
2 changed files with 11 additions and 6 deletions

View File

@@ -14,7 +14,9 @@ class SymfonyException extends HttpException
$this->exception = $exception;
parent::__construct(
$exception->getStatusCode(),
$exception->getMessage()
$exception->getMessage(),
null,
$exception->getHeaders()
);
}
@@ -23,7 +25,7 @@ class SymfonyException extends HttpException
*/
public function getErrorType(): string
{
return 'internal-error';
return 'http-exception';
}
/**