From 168a2bc1f4bb9c3c07b2b3c64b2c5cf84941f8a6 Mon Sep 17 00:00:00 2001 From: Joy Lal Chattaraj <8450903+chattarajoy@users.noreply.github.com> Date: Thu, 27 Feb 2020 14:43:00 +0530 Subject: [PATCH] Validate a JSON response before checking response code (#308) --- qds_sdk/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qds_sdk/connection.py b/qds_sdk/connection.py index 3ec4c0a8..c456a4e1 100644 --- a/qds_sdk/connection.py +++ b/qds_sdk/connection.py @@ -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