Added more debug info, to fix a wierd bug

This commit is contained in:
Mads Marquart
2018-06-26 10:40:01 +02:00
parent ead696cbad
commit 9b7a84ea45
2 changed files with 3 additions and 1 deletions

View File

@@ -925,7 +925,7 @@ class Client(object):
if len(message_ids) != 1: if len(message_ids) != 1:
log.warning("Got multiple message ids' back: {}".format(message_ids)) log.warning("Got multiple message ids' back: {}".format(message_ids))
message_id = message_ids[0] message_id = message_ids[0]
except (KeyError, IndexError) as e: except (KeyError, IndexError, TypeError) as e:
raise FBchatException('Error when sending message: No message IDs could be found: {}'.format(j)) raise FBchatException('Error when sending message: No message IDs could be found: {}'.format(j))
# update JS token if received in response # update JS token if received in response

View File

@@ -213,8 +213,10 @@ def check_request(r, as_json=True):
except ValueError: except ValueError:
raise FBchatFacebookError('Error while parsing JSON: {!r}'.format(content)) raise FBchatFacebookError('Error while parsing JSON: {!r}'.format(content))
check_json(j) check_json(j)
log.debug(j)
return j return j
else: else:
log.debug(content)
return content return content
def get_jsmods_require(j, index): def get_jsmods_require(j, index):