X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/b4fa82e3298a15443ca40bff205b7a16a1031d92..refs/pull/3698/head:/app/Exceptions/Handler.php diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 7ec502525..187664f9e 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -21,6 +21,7 @@ class Handler extends ExceptionHandler */ protected $dontReport = [ NotFoundException::class, + StoppedAuthenticationException::class, ]; /** @@ -101,6 +102,10 @@ class Handler extends ExceptionHandler $code = $e->status; } + if (method_exists($e, 'getStatus')) { + $code = $e->getStatus(); + } + $responseData['error']['code'] = $code; return new JsonResponse($responseData, $code, $headers);