Don't try and decode an empty body
This commit is contained in:
@@ -103,6 +103,7 @@ class Connection(object):
|
||||
error_message = raw_data
|
||||
additional_info = None
|
||||
try:
|
||||
if raw_data:
|
||||
additional_info = json.loads(raw_data)
|
||||
error_message = additional_info.get('error', error_message)
|
||||
if isinstance(error_message, dict) and 'type' in error_message:
|
||||
|
||||
Reference in New Issue
Block a user