diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index a81f1a4644..9a7c58a815 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -105,7 +105,7 @@ class Handler extends ExceptionHandler protected function unauthenticated($request, AuthenticationException $exception) { if ($request->expectsJson()) { - return response()->json(['error' => 'Unauthorized.'], 401); + return response()->json(['error' => 'Unauthorized or unauthenticated.'], 401); } return redirect()->guest('login');