mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 19:42:29 +00:00
Treat all error codes as positive
This means that -500 errors will now behave like 500 errors correctly so the -500 "No workers running" will properly be caught and the library will retry requests by default.
This commit is contained in:
@@ -100,7 +100,7 @@ class ServerError(RPCError):
|
||||
for example, there was a disruption while accessing a database or file
|
||||
storage.
|
||||
"""
|
||||
code = 500
|
||||
code = 500 # Also witnessed as -500
|
||||
message = 'INTERNAL'
|
||||
|
||||
def __init__(self, request, message):
|
||||
@@ -113,7 +113,7 @@ class BotTimeout(RPCError):
|
||||
Clicking the inline buttons of bots that never (or take to long to)
|
||||
call ``answerCallbackQuery`` will result in this "special" RPCError.
|
||||
"""
|
||||
code = -503
|
||||
code = 503 # Only witnessed as -503
|
||||
message = 'Timeout'
|
||||
|
||||
def __init__(self, request, message):
|
||||
|
Reference in New Issue
Block a user