We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aba1b29 commit a7fae86Copy full SHA for a7fae86
app/Exceptions/Handler.php
@@ -231,7 +231,7 @@ public static function isReportable(Exception $exception): bool
231
protected function unauthenticated($request, AuthenticationException $exception)
232
{
233
if ($request->expectsJson()) {
234
- return response()->json(['error' => 'Unauthenticated.'], 401);
+ return response()->json(self::convertToArray($exception), 401);
235
}
236
237
return redirect()->guest(route('auth.login'));
0 commit comments