mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-07-01 00:51:42 +00:00
Fix "HTTP 500 on not found" bug #4290
This commit is contained in:
parent
ecf99fa0ed
commit
9ba7d1e6c5
|
@ -79,7 +79,7 @@ class Handler extends ExceptionHandler
|
||||||
*/
|
*/
|
||||||
protected function renderApiException(Throwable $e): JsonResponse
|
protected function renderApiException(Throwable $e): JsonResponse
|
||||||
{
|
{
|
||||||
$code = 500;
|
$code = $e->getCode() === 0 ? 500 : $e->getCode();
|
||||||
$headers = [];
|
$headers = [];
|
||||||
|
|
||||||
if ($e instanceof HttpException) {
|
if ($e instanceof HttpException) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user