Closed SuperMasterBlasterLaser closed 8 years ago
@SuperMasterBlasterLaser The TelegramApiException thrown should have a field called apiResponse
that must contain the exact response from Telegram servers, regardless which one it is. If you handle it, you should be able to access that field with the description, can you check?
@rubenlagus I think this apiResponse should be added to Exceptions message string.
@SuperMasterBlasterLaser Why don't you just call getApiResponse() method in the exception to get the answer (if present) ? I don't think the full apiResponse should be added to the message as it is not always needed to find out the reasons..
@rubenlagus Maybe not full apiResponse message itself, just simple 3-4 word summary. What do you think about it?
When I use method with callback:
Exception happens on
sendMessage
method:Why this exception happens? Is there any option to disable this
StaticLoggerBinder
@rubenlagus ? I also use async version of MongoDB Java driver.UPDATE
I have added SLF4J and configured. However, I still get error at
sendMessage
:There is no proper description of what is happening.
UPDATE: I have found why this error is happening
Telegram has message length limit, which is 4096 symbols. My messages where more than 6000 symbols.
Your Bot API does not handle this error explicitly it just says ERROR HAPPENED and thats all. I spend 4 hours thinking that error is happening because of other libs.
Please add proper error message to this condition!