mirror of
https://github.com/Steffo99/greed.git
synced 2024-11-21 21:44:19 +00:00
Catch _all_ Bad Gateway Telegram errors
This commit is contained in:
parent
22b63aa24f
commit
a41728ba12
1 changed files with 1 additions and 1 deletions
2
utils.py
2
utils.py
|
@ -129,7 +129,7 @@ def catch_telegram_errors(func):
|
|||
time.sleep(5)
|
||||
# Unknown error
|
||||
except telegram.error.TelegramError as error:
|
||||
if error.message.lower() == "bad gateway":
|
||||
if error.message.lower() in ["bad gateway", "invalid server response"]:
|
||||
print(f"Bad Gateway while calling {func.__name__}(), retrying in 5 secs...")
|
||||
time.sleep(5)
|
||||
elif error.message.lower() == "timed out":
|
||||
|
|
Loading…
Reference in a new issue