Lately I have been using the nodes: node-red-contrib-telegrambot-home, I have seen that if any user blocks the BOT, the whole Node-red service restarts, I have tried with the catch to receive the error to handle it but it doesn't detect the error:
NR log:
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason: Error: ETELEGRAM: 403 Forbidden: Bot was blocked by the user at /home/pi/.node-red/node_modules/node-telegram-bot-api/src/telegram.js:291:15 at tryCatcher (/home/pi/.node-red/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/home/pi/.node-red/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/home/pi/.node-red/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/home/pi/.node-red/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/home/pi/.node-red/node_modules/bluebird/js/release/promise.js:729:18) at _drainQueueStep (/home/pi/.node-red/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/home/pi/.node-red/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/home/pi/.node-red/node_modules/bluebird/js/release/async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (/home/pi/.node-red/node_modules/bluebird/js/release/async.js:15:14) at processImmediate (internal/timers.js:461:21) nodered.service: Main process exited, code=exited, status=1/FAILURE nodered.service: Failed with result 'exit-code'. nodered.service: Service RestartSec=20s expired, scheduling restart. nodered.service: Scheduled restart job, restart counter is at 1.
Has this happened to anyone else? Can I do something to stop the NR service from restarting with this error?
Submitting an issue is the right thing to do, the node should not crash node red on this sort of error.
I suspect you may get little support though, as there is at least one rather similar issue that has been waiting for a long time to get fixed.
Is there a reason you are using that node rather than node-red-contrib-telegrambot which I think most people use?
Thanks for the reply Colin!
Some time ago I had installed the first thing I had seen and I am sticking with telegrambot-home, due to the fact that I have more than 40 flows using these nodes, and many automated tasks, it would be unfeasible to switch to node-red-contrib-telegrambot as I would have to redo everything
I will check if I can modify something in telegrambot-home to handle these errors, and if I can't, I will consider migrating everything to node-red-contrib-telegrambot, which will take me at least a month of work