Add more explicit error handling

This commit is contained in:
Mads Marquart
2019-07-02 17:32:35 +02:00
parent 3236ea5b97
commit c9f11b924d
3 changed files with 13 additions and 21 deletions

View File

@@ -49,9 +49,9 @@ def graphql_response_to_json(content):
if "error_results" in x:
del rtn[-1]
continue
_util.check_json(x)
_util.handle_payload_error(x)
[(key, value)] = x.items()
_util.check_json(value)
_util.handle_graphql_error(value)
if "response" in value:
rtn[int(key[1:])] = value["response"]
else: