Skip to content

Commit

Permalink
Validate a JSON response before checking response code (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
chattarajoy authored Feb 27, 2020
1 parent f91ea27 commit 168a2bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qds_sdk/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ def _api_call_raw(self, req_type, path, data=None, params=None):
else:
raise NotImplemented

self._validate_json(r)
self._handle_error(r)
return r

def _api_call(self, req_type, path, data=None, params=None):
response = self._api_call_raw(req_type, path, data=data, params=params)
self._validate_json(response)
return response.json()

@staticmethod
Expand Down

0 comments on commit 168a2bc

Please sign in to comment.