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)
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?
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)