Skip to content

Commit 6e3c454

Browse files
committed
bugfix
1 parent b3d7886 commit 6e3c454

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tqdev/PhpCrudApi/ResponseUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static function output(ResponseInterface $response)
2323
public static function addExceptionHeaders(ResponseInterface $response, \Throwable $e): ResponseInterface
2424
{
2525
$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())));
2727
$response = $response->withHeader('X-Exception-File', $e->getFile() . ':' . $e->getLine());
2828
return $response;
2929
}

0 commit comments

Comments
 (0)