Skip to content

Hitting rate limit on GetUpdates. Seeking for way forward. #1422

Closed Answered by JrooTJunior
MrVolot asked this question in Q&A
Discussion options

You must be logged in to vote

You should do nothing with this error.

getUpdates method has no actual rate-limit. This error means that the Telegram Bot API Server is restarting and request should be retried in 5 seconds and this operation is already handled by aiogram itself in the same way as any other network issues - retrying request and notifined in the logs to helps to understand why your bot is not handling new events until server will be still alive.

try:
updates = await bot(get_updates, **kwargs)
except Exception as e:
failed = True
# In cases when Telegram Bot API was inaccessible don't need to stop polling

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JrooTJunior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants