mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-10 05:06:56 +08:00
Fix "HTTP 500 on not found" bug #4290
This commit is contained in:
@ -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) {
|
||||||
|
Reference in New Issue
Block a user