We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3d7886 commit 6e3c454Copy full SHA for 6e3c454
src/Tqdev/PhpCrudApi/ResponseUtils.php
@@ -23,7 +23,7 @@ public static function output(ResponseInterface $response)
23
public static function addExceptionHeaders(ResponseInterface $response, \Throwable $e): ResponseInterface
24
{
25
$response = $response->withHeader('X-Exception-Name', get_class($e));
26
- $response = $response->withHeader('X-Exception-Message', $e->getMessage());
+ $response = $response->withHeader('X-Exception-Message', preg_replace('|\n|', ' ', trim($e->getMessage())));
27
$response = $response->withHeader('X-Exception-File', $e->getFile() . ':' . $e->getLine());
28
return $response;
29
}
0 commit comments