|
@@ -23,7 +23,7 @@ class ResponseUtils
|
23
|
23
|
public static function addExceptionHeaders(ResponseInterface $response, \Throwable $e): ResponseInterface
|
24
|
24
|
{
|
25
|
25
|
$response = $response->withHeader('X-Exception-Name', get_class($e));
|
26
|
|
- $response = $response->withHeader('X-Exception-Message', $e->getMessage());
|
|
26
|
+ $response = $response->withHeader('X-Exception-Message', preg_replace('|\n|', ' ', trim($e->getMessage())));
|
27
|
27
|
$response = $response->withHeader('X-Exception-File', $e->getFile() . ':' . $e->getLine());
|
28
|
28
|
return $response;
|
29
|
29
|
}
|