Merge pull request #197 from Arcanemagus/print_raw_error_response
Print raw response when JSON fails to parse
This commit is contained in:
commit
0f8cbc77ef
@ -268,7 +268,9 @@ class Tautulli:
|
||||
try:
|
||||
response_json = response.json()
|
||||
except ValueError:
|
||||
print("Failed to parse json response for Tautulli API cmd '{}'".format(cmd))
|
||||
print(
|
||||
"Failed to parse json response for Tautulli API cmd '{}': {}"
|
||||
.format(cmd, response.content))
|
||||
return
|
||||
|
||||
if response_json['response']['result'] == 'success':
|
||||
|
Loading…
Reference in New Issue
Block a user