Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Error of 'can't parser entity' from telegram server if I send a long message. #19

Open
qinjian623 opened this issue Jan 7, 2016 · 7 comments

Comments

@qinjian623
Copy link
Contributor

When I sent long message, but not very long ( maybe almost 100~300 chars), I got the error message like "can't parse entity" from server.
Sorry, I didn't record that message, so I can't tell you the exact message.

I think it may be the problem of html encoder when sending the Message hash, that makes telegram server doesn't know how to parse the uri and post data.

@ogonki-vetochki
Copy link
Contributor

@qinjian623
I think this is MESSAGE_TOO_LONG Telegram's error, described in documentation:
https://core.telegram.org/method/messages.sendMessage

Message was too long.
Current maximum length is 4096 UTF8 characters

@ogonki-vetochki
Copy link
Contributor

@qinjian623
Nevermind, I started to work on centralised excpetions handling, this is what I've got from Telegram API:
Telegram API has returned the error: {"ok"=>false, "error_code"=>400, "description"=>"[Error]: Bad Request: Message text is empty"} (TelegramBot::ResponseError)

@eljojo
Copy link
Owner

eljojo commented Jan 16, 2016

We could probably have a ruby class for every know exception that comes back from the server

@ogonki-vetochki
Copy link
Contributor

@eljojo
#23

@ogonki-vetochki
Copy link
Contributor

anyone?

@qinjian623
Copy link
Contributor Author

@xamenrax
hi, I think it need a few more days for author to accept the PR.
Be patient, please.

@ogonki-vetochki
Copy link
Contributor

</3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants