We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 266fd5a commit 377a5b2Copy full SHA for 377a5b2
flask_graphql_auth/decorators.py
@@ -88,7 +88,11 @@ def jwt_required(fn):
88
@wraps(fn)
89
def wrapper(*args, **kwargs):
90
token = kwargs.pop(current_app.config['JWT_TOKEN_ARGUMENT_NAME'])
91
- verify_jwt_in_argument(token)
+ try:
92
+ verify_jwt_in_argument(token)
93
+ except Exception as e:
94
+ return GraphQLError(e)
95
+
96
return fn(*args, **kwargs)
97
return wrapper
98
@@ -103,6 +107,10 @@ def jwt_refresh_token_required(fn):
103
107
104
108
105
109
106
- verify_refresh_jwt_in_argument(token)
110
111
+ verify_refresh_jwt_in_argument(token)
112
113
114
115
116
0 commit comments