Updated exception handler

This commit is contained in:
snipe 2020-12-15 17:25:05 -08:00
parent 1023fa3edd
commit 5909860c5a

View file

@ -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');