scraton / node-red-contrib-telegrambot-home

Useful Node RED nodes for connecting your home to Telegram.
MIT License
28 stars 11 forks source link

Node-red crash when trying to send a message to a user who has blocked the BOT #37

Open AchrafBr1 opened 2 years ago

AchrafBr1 commented 2 years ago

Sometimes users deletes/block the bots and this error shows up & node-red is restarted:

12 Mar 21:56:40 - [info] ttsultimate: Hailing .MP3, skip tts, filename: Hailing_Hailing.mp3 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.

Catch node does not detect anything.

Thank's in advance

Regards

vibraHome commented 1 month ago

Same here. Any news?

Regards