Log in here to report bugs or suggest features. Please enter your phone number in the international format and we will send a confirmation message to your account via Telegram.
We've just sent you a message.
Please confirm access via Telegram
When you send a request like for example deleteMessage, editMessageText and the like, and you get an error response, the error response contains way too little information.
The only properties are 'error_code' which is the HTTP error code (e.g. 400, 404, 500, ...) and 'description'. The description is in plain English, e.g. "Message to edit not found".
This kind of response is completely unusable. I want to be able to distinguish PROGRAMMATICALLY cases like: the message that I'm trying to delete/edit was not found, vs some of the parameters I provided was invalid, etc.
Right now the only way to do that is to "parse" the description, which is in plain English. But you can't expect me to use AI to parse plain English responses. If I just compare the description to a set of expected description strings, it will be too error prone and will break as soon as you change the phrasing of some error description.
You should define detailed error codes (besides the HTTP error code) and document them, whether they are numeric or strings like "message_not_found" or the like.