Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Hide errors in TokenVerify

fowczarek6b3b74119729
diff --git a/saleor/graphql/core/mutations.py b/saleor/graphql/core/mutations.py
index f58e645f13..829d4b1cf9 100644
--- a/saleor/graphql/core/mutations.py
+++ b/saleor/graphql/core/mutations.py
@@ -496,3 +496,10 @@ class VerifyToken(Verify):
username_field = get_user_model().USERNAME_FIELD
kwargs = {username_field: self.payload.get(username_field)}
return models.User.objects.get(**kwargs)
+
+ @classmethod
+ def mutate(cls, root, info, token, **kwargs):
+ try:
+ return super().mutate(root, info, token, **kwargs)
+ except JSONWebTokenError:
+ return None