question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stopping a receiving messages when an error occurs

See original GitHub issue

When an error occurs in HandleUpdateAsync and HandleErrorAsync methods, bot stop receiving messages. Is that how it’s supposed to work?

https://github.com/TelegramBots/Telegram.Bot.Extensions.Polling/blob/52c1edf4ff13d97c0b6d5ed8a62631cceadd9210/src/Telegram.Bot.Extensions.Polling/DefaultUpdateReceiver.cs#L99-L115

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lorenzo93commented, Mar 22, 2023

There is a way to automatically restart the bot after an exception? I also have the same problem, but I’m receiving exception because a user has blocked the bot. I don’t want to wrap each call to sendMessageAsync with a try-catch to avoid interruption, is there another way?

0reactions
mostafafayyazcommented, Jul 24, 2023

i have this problem, my bot stop receiving messages for any problem and after restarting bot , it working fine again. how i can restart bot automatically when an error occur ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix problems sending, receiving or connecting to Messages
If you can't send or receive messages, or have trouble connecting to Messages on web, try the following suggestions below. Fix problems sending...
Read more >
If you can't send or receive messages on your iPhone or iPad
If you're in a group message and stop receiving messages, check to see if you left the conversation. Open Messages and tap the...
Read more >
Error occurs when you send or receive an email message ...
In Outlook, click the Send/Receive tab, and then click Work Offline. Note This stops Outlook from trying to send all email messages. Select...
Read more >
Time sensitive message error - Apple Community
It seems like you are receiving Time Sensitive notifications. Check to see if you have it enabled in Settings > Focus and disable...
Read more >
Messages Keeps Stopping on Android, How to Fix
Part 2. How to Fix "Unfortunately, Messages has stopped" Error on Android? · Head to Settings > Apps & notifications > Messages and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found