]> BookStack Code Mirror - bookstack/blobdiff - app/Exceptions/Handler.php
CSS: Updated status colors to be CSS variables, Added dark variants
[bookstack] / app / Exceptions / Handler.php
index 187664f9ef7cf779c9f7e85321975e176f789d42..f2672cf5778a11e13046be41ca99a65a66ca2ae3 100644 (file)
@@ -17,7 +17,7 @@ class Handler extends ExceptionHandler
     /**
      * A list of the exception types that are not reported.
      *
-     * @var array
+     * @var array<int, class-string<\Throwable>>
      */
     protected $dontReport = [
         NotFoundException::class,
@@ -25,9 +25,9 @@ class Handler extends ExceptionHandler
     ];
 
     /**
-     * A list of the inputs that are never flashed for validation exceptions.
+     * A list of the inputs that are never flashed to the session on validation exceptions.
      *
-     * @var array
+     * @var array<int, string>
      */
     protected $dontFlash = [
         'current_password',
@@ -98,6 +98,7 @@ class Handler extends ExceptionHandler
         ];
 
         if ($e instanceof ValidationException) {
+            $responseData['error']['message'] = 'The given data was invalid.';
             $responseData['error']['validation'] = $e->errors();
             $code = $e->status;
         }