diff --git a/app/Http/Middleware/Api/Application/AuthenticateUser.php b/app/Http/Middleware/Api/Application/AuthenticateUser.php index 5bbce8296..7208dbaf9 100644 --- a/app/Http/Middleware/Api/Application/AuthenticateUser.php +++ b/app/Http/Middleware/Api/Application/AuthenticateUser.php @@ -19,7 +19,7 @@ class AuthenticateUser public function handle(Request $request, Closure $next) { if (is_null($request->user()) || ! $request->user()->root_admin) { - throw new AccessDeniedHttpException; + throw new AccessDeniedHttpException('This account does not have permission to access the API.'); } return $next($request);