szastupov / aiotg

Asynchronous Python library for building Telegram bots
MIT License
381 stars 44 forks source link

RuntimeError is too broad kind of exception, replaced with TgBotApiError #55

Closed alekseyl1992 closed 7 years ago

alekseyl1992 commented 7 years ago

RuntimeError was too broad kind of exception. I've replaced it with TgBotApiError. TgBotApiError is a subclass of RuntimeError, so back compatibility shouldn't be broken. And added response field, in case if calling side wants to know details. (for example - to distinguish Bad Request responses from others)

szastupov commented 7 years ago

We used to have Tg prefix for classes like TgBot, TgInlineQuery but decided to deprecated them. Could you rename it to BotApiError and move to the end of file?

Thanks ✌️

alekseyl1992 commented 7 years ago

done

szastupov commented 7 years ago

Thanks!