graphql: parse response JSON once on error
This commit is contained in:
parent
599f3fe477
commit
b9e55a0a22
|
@ -96,7 +96,7 @@ class GraphQLOperation:
|
|||
resp = r.json()
|
||||
if r.status_code != 200 or "errors" in resp:
|
||||
if valid is None:
|
||||
raise GraphQLError(r.json())
|
||||
raise GraphQLError(resp)
|
||||
else:
|
||||
_copy_errors(valid, resp)
|
||||
return resp.get("data")
|
||||
|
|
Loading…
Reference in New Issue