From 08d2e0556b63e651e5dcd86cb2917fccb2ddbb5d Mon Sep 17 00:00:00 2001 From: Vahid Masoumi Date: Mon, 17 Apr 2017 00:57:07 +0430 Subject: [PATCH] ordering of BadRequest errors --- Exception-Handling.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Exception-Handling.md b/Exception-Handling.md index 8821a36..7ccf28b 100644 --- a/Exception-Handling.md +++ b/Exception-Handling.md @@ -46,13 +46,13 @@ telegram.error.BadRequest: Query_id_invalid [...] telegram.error.BadRequest: Invalid file id ->>> bot.sendMessage(chat_id, 'a'*40960) -[...] -telegram.error.BadRequest: Message is too long - >>> bot.editMessageText(chat_id, "sample old message") [...] telegram.error.BadRequest: Message is not modified + +>>> bot.sendMessage(chat_id, 'a'*40960) +[...] +telegram.error.BadRequest: Message is too long ``` For the last one you can check if your message is too long by comparing with `telegram.constants.MAX_MESSAGE_LENGTH`. There is something similar for captions: `telegram.constants.MAX_CAPTION_LENGTH`.