From 7ac1896e8100752344909065fc7a39e365d5fb0c Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 21 May 2017 18:56:20 +0300 Subject: [PATCH] Log response --- aiogram/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aiogram/api.py b/aiogram/api.py index 12b0205f..2586636c 100644 --- a/aiogram/api.py +++ b/aiogram/api.py @@ -39,6 +39,7 @@ async def _check_result(method_name, response): description = result_json.get('description') raise TelegramAPIError(f"Error code: {code} Description {description}", method_name, response.status, body) + log.debug(f"Response for '{method_name}': {result_json}") return result_json.get('result') @@ -51,7 +52,7 @@ async def request(session, token, method, data=None): class ApiMethods: GET_ME = 'getMe' - GET_UPDATES = 'getUpdates' # TODO + GET_UPDATES = 'getUpdates' SET_WEBHOOK = 'setWebhook' # TODO DELETE_WEBHOOK = 'deleteWebhook' # TODO GET_WEBHOOK_INFO = 'getWebhookInfo' # TODO