diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 653cadf1..e9f820eb 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -52,7 +52,7 @@ public function render($request, Exception $exception) protected function unauthenticated($request, AuthenticationException $exception) { return $request->expectsJson() - ? response()->json(['error' => 'Unauthenticated.'], 401) + ? response()->json(['message' => 'Unauthenticated.'], 401) : redirect()->guest(route('login')); } }