From 5b6d3b83257bc12cf925a0e9620e1f7e892d0728 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 24 Feb 2018 12:27:41 -0600 Subject: [PATCH] Slightly more clear errors --- app/Http/Middleware/Api/Application/AuthenticateUser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Middleware/Api/Application/AuthenticateUser.php b/app/Http/Middleware/Api/Application/AuthenticateUser.php index 5bbce829..7208dbaf 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);