Document several new RPC errors

This commit is contained in:
Lonami Exo 2020-06-06 13:12:11 +02:00
parent 3f74f83964
commit 20a6d7b26b
2 changed files with 7 additions and 2 deletions

View File

@ -15,9 +15,13 @@ AUTH_KEY_INVALID,401,The key is invalid
AUTH_KEY_PERM_EMPTY,401,"The method is unavailable for temporary authorization key, not bound to permanent"
AUTH_KEY_UNREGISTERED,401,The key is not registered in the system
AUTH_RESTART,500,Restart the authorization process
AUTH_TOKEN_ALREADY_ACCEPTED,400,The authorization token was already used
AUTH_TOKEN_EXPIRED,400,The provided authorization token has expired and the updated QR-code must be re-scanned
AUTH_TOKEN_INVALID,400,An invalid authorization token was provided
BANNED_RIGHTS_INVALID,400,"You cannot use that set of permissions in this request, i.e. restricting view_messages as a default"
BOTS_TOO_MUCH,400,There are too many bots in this chat/channel
BOT_CHANNELS_NA,400,Bots can't edit admin privileges
BOT_COMMAND_DESCRIPTION_INVALID,400,"The command description was empty, too long or had invalid characters used"
BOT_GROUPS_BLOCKED,400,This bot can't be added to groups
BOT_INLINE_DISABLED,400,This bot can't be used in inline mode
BOT_INVALID,400,This is not a valid bot
@ -67,6 +71,7 @@ CONNECTION_LANG_PACK_INVALID,400,"The specified language pack is not valid. This
CONNECTION_LAYER_INVALID,400,The very first request must always be InvokeWithLayerRequest
CONNECTION_NOT_INITED,400,Connection not initialized
CONNECTION_SYSTEM_EMPTY,400,Connection system empty
CONNECTION_SYSTEM_LANG_CODE_EMPTY,400,The system language string was empty during connection
CONTACT_ID_INVALID,400,The provided contact ID is invalid
CONTACT_NAME_EMPTY,400,The provided contact name cannot be empty
DATA_INVALID,400,Encrypted data invalid

1 name codes description
15 AUTH_KEY_PERM_EMPTY 401 The method is unavailable for temporary authorization key, not bound to permanent
16 AUTH_KEY_UNREGISTERED 401 The key is not registered in the system
17 AUTH_RESTART 500 Restart the authorization process
18 AUTH_TOKEN_ALREADY_ACCEPTED 400 The authorization token was already used
19 AUTH_TOKEN_EXPIRED 400 The provided authorization token has expired and the updated QR-code must be re-scanned
20 AUTH_TOKEN_INVALID 400 An invalid authorization token was provided
21 BANNED_RIGHTS_INVALID 400 You cannot use that set of permissions in this request, i.e. restricting view_messages as a default
22 BOTS_TOO_MUCH 400 There are too many bots in this chat/channel
23 BOT_CHANNELS_NA 400 Bots can't edit admin privileges
24 BOT_COMMAND_DESCRIPTION_INVALID 400 The command description was empty, too long or had invalid characters used
25 BOT_GROUPS_BLOCKED 400 This bot can't be added to groups
26 BOT_INLINE_DISABLED 400 This bot can't be used in inline mode
27 BOT_INVALID 400 This is not a valid bot
71 CONNECTION_LAYER_INVALID 400 The very first request must always be InvokeWithLayerRequest
72 CONNECTION_NOT_INITED 400 Connection not initialized
73 CONNECTION_SYSTEM_EMPTY 400 Connection system empty
74 CONNECTION_SYSTEM_LANG_CODE_EMPTY 400 The system language string was empty during connection
75 CONTACT_ID_INVALID 400 The provided contact ID is invalid
76 CONTACT_NAME_EMPTY 400 The provided contact name cannot be empty
77 DATA_INVALID 400 Encrypted data invalid

View File

@ -72,7 +72,7 @@ auth.exportAuthorization,both,DC_ID_INVALID
auth.exportLoginToken,user,
auth.importAuthorization,both,AUTH_BYTES_INVALID USER_ID_INVALID
auth.importBotAuthorization,both,ACCESS_TOKEN_EXPIRED ACCESS_TOKEN_INVALID API_ID_INVALID
auth.importLoginToken,user,
auth.importLoginToken,user,AUTH_TOKEN_ALREADY_ACCEPTED AUTH_TOKEN_EXPIRED AUTH_TOKEN_INVALID
auth.logOut,both,
auth.recoverPassword,user,CODE_EMPTY
auth.requestPasswordRecovery,user,PASSWORD_EMPTY
@ -83,7 +83,7 @@ auth.signIn,user,PHONE_CODE_EMPTY PHONE_CODE_EXPIRED PHONE_CODE_INVALID PHONE_NU
auth.signUp,user,FIRSTNAME_INVALID MEMBER_OCCUPY_PRIMARY_LOC_FAILED PHONE_CODE_EMPTY PHONE_CODE_EXPIRED PHONE_CODE_INVALID PHONE_NUMBER_FLOOD PHONE_NUMBER_INVALID PHONE_NUMBER_OCCUPIED REG_ID_GENERATE_FAILED
bots.answerWebhookJSONQuery,bot,QUERY_ID_INVALID USER_BOT_INVALID
bots.sendCustomRequest,bot,USER_BOT_INVALID
bots.setBotCommands,bot,
bots.setBotCommands,bot,BOT_COMMAND_DESCRIPTION_INVALID
channels.checkUsername,user,CHANNEL_INVALID CHAT_ID_INVALID USERNAME_INVALID
channels.createChannel,user,CHAT_TITLE_EMPTY USER_RESTRICTED
channels.deleteChannel,user,CHANNEL_INVALID CHANNEL_PRIVATE

1 method usability errors
72 auth.exportLoginToken user
73 auth.importAuthorization both AUTH_BYTES_INVALID USER_ID_INVALID
74 auth.importBotAuthorization both ACCESS_TOKEN_EXPIRED ACCESS_TOKEN_INVALID API_ID_INVALID
75 auth.importLoginToken user AUTH_TOKEN_ALREADY_ACCEPTED AUTH_TOKEN_EXPIRED AUTH_TOKEN_INVALID
76 auth.logOut both
77 auth.recoverPassword user CODE_EMPTY
78 auth.requestPasswordRecovery user PASSWORD_EMPTY
83 auth.signUp user FIRSTNAME_INVALID MEMBER_OCCUPY_PRIMARY_LOC_FAILED PHONE_CODE_EMPTY PHONE_CODE_EXPIRED PHONE_CODE_INVALID PHONE_NUMBER_FLOOD PHONE_NUMBER_INVALID PHONE_NUMBER_OCCUPIED REG_ID_GENERATE_FAILED
84 bots.answerWebhookJSONQuery bot QUERY_ID_INVALID USER_BOT_INVALID
85 bots.sendCustomRequest bot USER_BOT_INVALID
86 bots.setBotCommands bot BOT_COMMAND_DESCRIPTION_INVALID
87 channels.checkUsername user CHANNEL_INVALID CHAT_ID_INVALID USERNAME_INVALID
88 channels.createChannel user CHAT_TITLE_EMPTY USER_RESTRICTED
89 channels.deleteChannel user CHANNEL_INVALID CHANNEL_PRIVATE