Skip to content

Commit 9cbe59b

Browse files
committed
Fixed assertion errors
1 parent 330a59f commit 9cbe59b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

flask_graphql/graphqlview.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ def dispatch_request(self):
9595
only_allow_query = request_method == 'get'
9696

9797
if not is_batch:
98-
assert isinstance(data, dict), "GraphQL params should be a dict. Received {}.".format(data)
98+
if not isinstance(data, dict):
99+
raise HttpQueryError(
100+
400,
101+
'GraphQL params should be a dict. Received {}.'.format(data)
102+
)
99103
data = dict(data, **request.args.to_dict())
100104
data = [data]
101105
elif not self.batch:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy