Log "API" in case of TelegramError raised during API call

This commit is contained in:
Davte 2019-07-01 15:54:33 +02:00
parent 5927dcd30f
commit d44e410101

View File

@ -153,7 +153,7 @@ class TelegramBot(object):
await response.json() # Telegram returns json objects await response.json() # Telegram returns json objects
) )
except TelegramError as e: except TelegramError as e:
logging.error(f"{e}") logging.error(f"API {e}")
return e return e
except Exception as e: except Exception as e:
logging.error(f"{e}", exc_info=True) logging.error(f"{e}", exc_info=True)