Include TAKEOUT_INIT_DELAY_X in the available errors

This commit is contained in:
Lonami Exo
2018-06-27 09:46:14 +02:00
parent 75865cbaa8
commit e604960a1d
3 changed files with 7 additions and 4 deletions

View File

@@ -64,4 +64,5 @@ USER_ALREADY_PARTICIPANT=The authenticated user is already a participant of the
USER_DEACTIVATED=The user has been deleted/deactivated
FLOOD_WAIT_X=A wait of {} seconds is required
FLOOD_TEST_PHONE_WAIT_X=A wait of {} seconds is required in the test servers
CHAT_NOT_MODIFIED=The chat or channel wasn't modified (title, invites, username, admins, etc. are the same).ç
TAKEOUT_INIT_DELAY_X=A wait of {} seconds is required before being able to initiate the takeout
CHAT_NOT_MODIFIED=The chat or channel wasn't modified (title, invites, username, admins, etc. are the same)

View File

@@ -28,6 +28,7 @@ KNOWN_CODES = {
CAPTURE_NAMES = {
'FloodWaitError': 'seconds',
'FloodTestPhoneWaitError': 'seconds',
'TakeoutInitDelayError': 'seconds',
'FileMigrateError': 'new_dc',
'NetworkMigrateError': 'new_dc',
'PhoneMigrateError': 'new_dc',
@@ -97,7 +98,7 @@ def parse_errors(json_file, descriptions_file):
# PWRTelegram's API doesn't return all errors, which we do need here.
# Add some special known-cases manually first.
errors[420].update((
'FLOOD_WAIT_X', 'FLOOD_TEST_PHONE_WAIT_X'
'FLOOD_WAIT_X', 'FLOOD_TEST_PHONE_WAIT_X', 'TAKEOUT_INIT_DELAY_X'
))
errors[401].update((
'AUTH_KEY_INVALID', 'SESSION_EXPIRED', 'SESSION_REVOKED'