Closed 2naive closed 3 years ago
I've lost so many messages from/to my clients this year because of this :(
And bot.catch() https://github.com/bostrot/telegram-support-bot/blob/master/src/index.ts#L91 is not working due to: https://github.com/telegraf/telegraf/issues/491 or could be solved just with
bot.catch((err, ctx) => {
console.log('Error: ', err)
ctx.reply('Message is not sent due to an error')
});
The code you posted doesn't work with unhandled rejections. For now I escaped some HTML characters as a quick fix and made the error handler send a message to the staffchat in case anything happens.
See 9f44bd6d19272a8bb0bc5aae08d507e5c1526c22.
Describe the bug If any error happens on sending message from/to user -> message just got lost and moderator/users receives reply that everything is fine https://github.com/bostrot/telegram-support-bot/blob/master/src/text.ts#L19
To Reproduce Steps to reproduce the behavior:
Expected behavior