grammyjs / grammY

The Telegram Bot Framework.
https://grammy.dev
MIT License
2.04k stars 106 forks source link

Add error type to `GrammyError` #589

Closed taminomara closed 2 months ago

taminomara commented 2 months ago

As I understand, telegram API returns error type on error. I'd like to have access to it so that I distinguish between expected and not expected errors. For example, I'd like to ignore MESSAGE_NOT_MODIFIED and throw anything else. Right now I have to check if error description contains some keywords, which is less reliable than checking error type.

taminomara commented 2 months ago

Oh no, it doesn't :(

KnorpelSenf commented 2 months ago

That's right, grammY already exposes everything there is :)