mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-22 22:45:09 +01:00
Handles HTTP Bad Gateway error (503) on request module #63
This commit is contained in:
parent
797a3e6ea4
commit
6c9490f2c6
1 changed files with 2 additions and 0 deletions
|
@ -94,6 +94,8 @@ def post(url,
|
|||
except HTTPError as error:
|
||||
if error.getcode() == 403:
|
||||
raise TelegramError('Unauthorized')
|
||||
if error.getcode() == 502:
|
||||
raise TelegramError('Bad Gateway')
|
||||
|
||||
message = _parse(error.read())
|
||||
raise TelegramError(message)
|
||||
|
|
Loading…
Reference in a new issue