diff --git a/vespa/deployment.py b/vespa/deployment.py index 0e59d990..f6505cd9 100644 --- a/vespa/deployment.py +++ b/vespa/deployment.py @@ -1284,7 +1284,10 @@ def _request_with_api_key( response = self.get_connection_response_with_retry(method, path, body, headers) if return_raw_response: return response - parsed = json.load(response) + try: + parsed = json.load(response) + except json.JSONDecodeError: + parsed = response.read() if response.status_code != 200: print(parsed) raise HTTPError(