]> BookStack Code Mirror - bookstack/blobdiff - app/Exceptions/Handler.php
Added OIDC group sync functionality
[bookstack] / app / Exceptions / Handler.php
index 7ec502525091f487b3a822df9d983a963bf5fde2..187664f9ef7cf779c9f7e85321975e176f789d42 100644 (file)
@@ -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);