Skip to content

Commit

Permalink
Fix auth exception
Browse files Browse the repository at this point in the history
  • Loading branch information
MoamenEltouny committed Aug 15, 2022
1 parent 3f328d2 commit 8b5401d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Exceptions/ExceptionHandler.php
Expand Up @@ -50,7 +50,7 @@ public function render($request, Throwable $e)
if ($trans == 'auth.unauthenticated') $trans = null;

return $this->shouldReturnJson($request, $e)
? json()->exception($e, null, $trans, 401)
? json()->exception($e, null, $trans, [], 401)
: redirect()->guest($e->redirectTo() ?? route('login'));
} elseif ($e instanceof ValidationException) {
return $this->convertValidationExceptionToResponse($e, $request);
Expand Down

0 comments on commit 8b5401d

Please sign in to comment.