Skip to content

Commit 7a59f14

Browse files
committed
avoid choking on JSON in case the response that comes back is not successful
1 parent d9e3ce1 commit 7a59f14

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def request(self, url, token, api, fields=None, version=2, **kwargs):
1515
if kwargs:
1616
params.update(kwargs)
1717
response = requests.get(self.compose_url(api, version), params=params)
18+
response.raise_for_status()
1819
return response.json()
1920

2021
def compose_url(self, api, version_number):

0 commit comments

Comments
 (0)