Closed vbauer closed 8 years ago
That's Telegrams fault afaik.
Probably, but is it possible to wrap this exception? In the current moment my bot suddenly breaks.
Why would you wrap that error? I think it is your responsibility you properly handle that error.
I mean this error occurs in the part of node-telegram-bot library. Is it possible to handle somehow this exception in my code?
How do you receive the error?
You can see full stacktrace in the description. That's all I have..
Did you get it in a callback or has it been thrown somewhere else?
If I have got this information, I could catch this error and add some logging, but I do not know how to understand it using this stacktrace.
I see that error occurs somewhere in poll method inside pollingRequest: https://github.com/depoio/node-telegram-bot/blob/master/lib/Bot.js#L273
Do something like bot.on('error', (err) => {/* handle error here */)
.
Thank you for suggestion, I will try it as soon as possible!
Hmm.. I've just checked source and I already have the following code (but bot was stopped anyway).
bot.on('error', function (error) {
log(error);
});
Perhaps the problem was caused by OpenShift. Thank you for your time! I will reopen this ticket, if find something interesting.