X Tutup
Skip to content

Commit 6c9490f

Browse files
committed
Handles HTTP Bad Gateway error (503) on request module python-telegram-bot#63
1 parent 797a3e6 commit 6c9490f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

telegram/utils/request.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ def post(url,
9494
except HTTPError as error:
9595
if error.getcode() == 403:
9696
raise TelegramError('Unauthorized')
97+
if error.getcode() == 502:
98+
raise TelegramError('Bad Gateway')
9799

98100
message = _parse(error.read())
99101
raise TelegramError(message)

0 commit comments

Comments
 (0)
X Tutup