Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d02e656

Browse files
committed
raise NetworkError for HTTP 502 (Bad Gateway)
1 parent 5b9ec7f commit d02e656

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

telegram/utils/request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def decorator(*args, **kwargs):
8484
if errcode in (401, 403):
8585
raise Unauthorized()
8686
if errcode == 502:
87-
raise TelegramError('Bad Gateway')
87+
raise NetworkError('Bad Gateway')
8888

8989
try:
9090
message = _parse(error.read())

0 commit comments

Comments
 (0)