Skip to content

Commit

Permalink
Handling of TOO_MANY_REQUESTS error
Browse files Browse the repository at this point in the history
  • Loading branch information
lavadk committed Apr 6, 2021
1 parent 2ea41ad commit 7a0419a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions liker/custom_markup/markup_synchronizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ def update(self):
except ApiTelegramException as ex:
if ex.error_code == telegram_error.BAD_REQUEST:
logger.error(f'Bad params in reply markup, ignoring it: {ex}')
elif ex.error_code == telegram_error.TOO_MANY_REQUESTS:
logger.error(f'Got TOO_MANY_REQUESTS error, will skip current channel update: {ex}')
break
else:
raise ex

Expand Down
2 changes: 1 addition & 1 deletion tengine

0 comments on commit 7a0419a

Please sign in to comment.