Skip to content

Commit 5acdee8

Browse files
Merge pull request #23 from Darkdragon84/fix_response_error
only call response.json() if response content is not empty
2 parents 26fd722 + 187b3f8 commit 5acdee8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tempoapiclient/rest_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def _response_handler(self, response):
4545
try:
4646
# If the response was successful, no Exception will be raised
4747
response.raise_for_status()
48-
return response.json()
48+
return response.json() if response.content else {}
4949

5050
except HTTPError as http_err:
5151
log.error(f'HTTP error occurred: {http_err.response.text}')

0 commit comments

Comments
 (0)