|
@@ -8,6 +8,7 @@ use Illuminate\Auth\Access\AuthorizationException;
|
|
|
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
|
|
use Laravel\Lumen\Exceptions\Handler as ExceptionHandler;
|
|
|
use Symfony\Component\HttpKernel\Exception\HttpException;
|
|
|
+use Tymon\JWTAuth\Exceptions\JWTException;
|
|
|
use Tymon\JWTAuth\Exceptions\TokenInvalidException;
|
|
|
|
|
|
class Handler extends ExceptionHandler
|
|
@@ -46,7 +47,7 @@ class Handler extends ExceptionHandler
|
|
|
*/
|
|
|
public function render($request, Exception $exception)
|
|
|
{
|
|
|
- if($exception instanceof TokenInvalidException){
|
|
|
+ if($exception instanceof JWTException){
|
|
|
$error = [
|
|
|
'message' => $exception->getMessage(),
|
|
|
'code' => 401,
|