Fix "HTTP 500 on not found" bug #4290

This commit is contained in:
Thomas Kuschan 2023-06-08 10:50:12 +02:00
parent ecf99fa0ed
commit 9ba7d1e6c5

View File

@ -79,7 +79,7 @@ class Handler extends ExceptionHandler
*/
protected function renderApiException(Throwable $e): JsonResponse
{
$code = 500;
$code = $e->getCode() === 0 ? 500 : $e->getCode();
$headers = [];
if ($e instanceof HttpException) {