diff --git a/app/Http/Middleware/ApiAuthenticate.php b/app/Http/Middleware/ApiAuthenticate.php index 5f0559f9..dc26807e 100644 --- a/app/Http/Middleware/ApiAuthenticate.php +++ b/app/Http/Middleware/ApiAuthenticate.php @@ -55,10 +55,10 @@ class ApiAuthenticate } } elseif ($request->getUser()) { if ($this->auth->onceBasic() !== null) { - throw new AccessDeniedHttpException(); + throw new UnauthorizedHttpException(); } } else { - throw new AccessDeniedHttpException(); + throw new UnauthorizedHttpException(); } }