Add new known RPCErrors (#3114)

This commit is contained in:
Devesh Pal 2021-07-21 02:34:09 +05:30 committed by GitHub
parent 3570953d14
commit 79866750d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -175,6 +175,7 @@ INTERDC_X_CALL_RICH_ERROR,500,A rich error occurred while communicating with DC
INVITE_HASH_EMPTY,400,The invite hash is empty
INVITE_HASH_EXPIRED,400,The chat the user tried to join has expired and is not valid anymore
INVITE_HASH_INVALID,400,The invite hash is invalid
LANG_CODE_INVALID,400,
LANG_PACK_INVALID,400,The provided language pack is invalid
LASTNAME_INVALID,400,The last name is invalid
LIMIT_INVALID,400,An invalid limit was provided. See https://core.telegram.org/api/files#downloading-files
@ -229,6 +230,7 @@ PARTICIPANT_VERSION_OUTDATED,400,The other participant does not use an up to dat
PASSWORD_EMPTY,400,The provided password is empty
PASSWORD_HASH_INVALID,400,The password (and thus its hash value) you entered is invalid
PASSWORD_MISSING,400,The account must have 2-factor authentication enabled (a password) before this method can be used
PASSWORD_RECOVERY_EXPIRED,400,
PASSWORD_REQUIRED,400,The account must have 2-factor authentication enabled (a password) before this method can be used
PASSWORD_TOO_FRESH_X,400,The password was added too recently and {seconds} seconds must pass before using the method
PAYMENT_PROVIDER_INVALID,400,The payment provider was not recognised or its token was invalid
@ -289,6 +291,7 @@ REG_ID_GENERATE_FAILED,500,Failure while generating registration ID
REPLY_MARKUP_GAME_EMPTY,400,The provided reply markup for the game is empty
REPLY_MARKUP_INVALID,400,The provided reply markup is invalid
REPLY_MARKUP_TOO_LONG,400,The data embedded in the reply markup buttons was too much
RESET_REQUEST_MISSING,400,
RESULTS_TOO_MUCH,400,"You sent too many results, see https://core.telegram.org/bots/api#answerinlinequery for the current limit"
RESULT_ID_DUPLICATE,400,Duplicated IDs on the sent results. Make sure to use unique IDs
RESULT_ID_INVALID,400,The given result cannot be used to send the selection to the bot
@ -313,6 +316,7 @@ SESSION_REVOKED,401,"The authorization has been invalidated, because of the user
SESSION_TOO_FRESH_X,400,The session logged in too recently and {seconds} seconds must pass before calling the method
SHA256_HASH_INVALID,400,The provided SHA256 hash is invalid
SHORTNAME_OCCUPY_FAILED,400,An error occurred when trying to register the short-name used for the sticker pack. Try a different name
SHORT_NAME_INVALID,400,
SHORT_NAME_OCCUPIED,400,
SLOWMODE_WAIT_X,420,A wait of {seconds} seconds is required before sending another message in this chat
SRP_ID_INVALID,400,

1 name codes description
175 INVITE_HASH_EMPTY 400 The invite hash is empty
176 INVITE_HASH_EXPIRED 400 The chat the user tried to join has expired and is not valid anymore
177 INVITE_HASH_INVALID 400 The invite hash is invalid
178 LANG_CODE_INVALID 400
179 LANG_PACK_INVALID 400 The provided language pack is invalid
180 LASTNAME_INVALID 400 The last name is invalid
181 LIMIT_INVALID 400 An invalid limit was provided. See https://core.telegram.org/api/files#downloading-files
230 PASSWORD_EMPTY 400 The provided password is empty
231 PASSWORD_HASH_INVALID 400 The password (and thus its hash value) you entered is invalid
232 PASSWORD_MISSING 400 The account must have 2-factor authentication enabled (a password) before this method can be used
233 PASSWORD_RECOVERY_EXPIRED 400
234 PASSWORD_REQUIRED 400 The account must have 2-factor authentication enabled (a password) before this method can be used
235 PASSWORD_TOO_FRESH_X 400 The password was added too recently and {seconds} seconds must pass before using the method
236 PAYMENT_PROVIDER_INVALID 400 The payment provider was not recognised or its token was invalid
291 REPLY_MARKUP_GAME_EMPTY 400 The provided reply markup for the game is empty
292 REPLY_MARKUP_INVALID 400 The provided reply markup is invalid
293 REPLY_MARKUP_TOO_LONG 400 The data embedded in the reply markup buttons was too much
294 RESET_REQUEST_MISSING 400
295 RESULTS_TOO_MUCH 400 You sent too many results, see https://core.telegram.org/bots/api#answerinlinequery for the current limit
296 RESULT_ID_DUPLICATE 400 Duplicated IDs on the sent results. Make sure to use unique IDs
297 RESULT_ID_INVALID 400 The given result cannot be used to send the selection to the bot
316 SESSION_TOO_FRESH_X 400 The session logged in too recently and {seconds} seconds must pass before calling the method
317 SHA256_HASH_INVALID 400 The provided SHA256 hash is invalid
318 SHORTNAME_OCCUPY_FAILED 400 An error occurred when trying to register the short-name used for the sticker pack. Try a different name
319 SHORT_NAME_INVALID 400
320 SHORT_NAME_OCCUPIED 400
321 SLOWMODE_WAIT_X 420 A wait of {seconds} seconds is required before sending another message in this chat
322 SRP_ID_INVALID 400

View File

@ -6,6 +6,7 @@ account.checkUsername,user,USERNAME_INVALID
account.confirmPasswordEmail,user,
account.confirmPhone,user,CODE_HASH_INVALID PHONE_CODE_EMPTY
account.createTheme,user,THEME_MIME_INVALID
account.declinePasswordReset,user,RESET_REQUEST_MISSING
account.deleteAccount,user,2FA_CONFIRM_WAIT_X
account.deleteSecureValue,user,
account.finishTakeoutSession,user,
@ -69,6 +70,7 @@ auth.acceptLoginToken,user,
auth.bindTempAuthKey,both,ENCRYPTED_MESSAGE_INVALID INPUT_REQUEST_TOO_LONG TEMP_AUTH_KEY_EMPTY TIMEOUT
auth.cancelCode,user,PHONE_NUMBER_INVALID
auth.checkPassword,user,PASSWORD_HASH_INVALID
auth.checkRecoveryPassword,user,PASSWORD_RECOVERY_EXPIRED
auth.dropTempAuthKeys,both,
auth.exportAuthorization,both,DC_ID_INVALID
auth.exportLoginToken,user,
@ -76,7 +78,7 @@ 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_TOKEN_ALREADY_ACCEPTED AUTH_TOKEN_EXPIRED AUTH_TOKEN_INVALID
auth.logOut,both,
auth.recoverPassword,user,CODE_EMPTY
auth.recoverPassword,user,CODE_EMPTY NEW_SETTINGS_INVALID
auth.requestPasswordRecovery,user,PASSWORD_EMPTY
auth.resendCode,user,PHONE_NUMBER_INVALID
auth.resetAuthorizations,user,TIMEOUT
@ -85,7 +87,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,BOT_COMMAND_DESCRIPTION_INVALID BOT_COMMAND_INVALID
bots.setBotCommands,bot,BOT_COMMAND_DESCRIPTION_INVALID BOT_COMMAND_INVALID LANG_CODE_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
@ -336,7 +338,7 @@ stats.getMegagroupStats,user,CHAT_ADMIN_REQUIRED MEGAGROUP_REQUIRED STATS_MIGRAT
stats.loadAsyncGraph,user,GRAPH_INVALID_RELOAD GRAPH_OUTDATED_RELOAD
stickers.addStickerToSet,bot,BOT_MISSING STICKERSET_INVALID STICKER_PNG_NOPNG STICKER_TGS_NOTGS
stickers.changeStickerPosition,bot,BOT_MISSING STICKER_INVALID
stickers.checkShortName,both,SHORT_NAME_OCCUPIED
stickers.checkShortName,both,SHORT_NAME_INVALID SHORT_NAME_OCCUPIED
stickers.createStickerSet,bot,BOT_MISSING PACK_SHORT_NAME_INVALID PACK_SHORT_NAME_OCCUPIED PEER_ID_INVALID SHORTNAME_OCCUPY_FAILED STICKERS_EMPTY STICKER_EMOJI_INVALID STICKER_FILE_INVALID STICKER_PNG_DIMENSIONS STICKER_PNG_NOPNG STICKER_TGS_NOTGS STICKER_THUMB_PNG_NOPNG STICKER_THUMB_TGS_NOTGS USER_ID_INVALID
stickers.removeStickerFromSet,bot,BOT_MISSING STICKER_INVALID
stickers.setStickerSetThumb,bot,STICKER_THUMB_PNG_NOPNG STICKER_THUMB_TGS_NOTGS

1 method usability errors
6 account.confirmPasswordEmail user
7 account.confirmPhone user CODE_HASH_INVALID PHONE_CODE_EMPTY
8 account.createTheme user THEME_MIME_INVALID
9 account.declinePasswordReset user RESET_REQUEST_MISSING
10 account.deleteAccount user 2FA_CONFIRM_WAIT_X
11 account.deleteSecureValue user
12 account.finishTakeoutSession user
70 auth.bindTempAuthKey both ENCRYPTED_MESSAGE_INVALID INPUT_REQUEST_TOO_LONG TEMP_AUTH_KEY_EMPTY TIMEOUT
71 auth.cancelCode user PHONE_NUMBER_INVALID
72 auth.checkPassword user PASSWORD_HASH_INVALID
73 auth.checkRecoveryPassword user PASSWORD_RECOVERY_EXPIRED
74 auth.dropTempAuthKeys both
75 auth.exportAuthorization both DC_ID_INVALID
76 auth.exportLoginToken user
78 auth.importBotAuthorization both ACCESS_TOKEN_EXPIRED ACCESS_TOKEN_INVALID API_ID_INVALID
79 auth.importLoginToken user AUTH_TOKEN_ALREADY_ACCEPTED AUTH_TOKEN_EXPIRED AUTH_TOKEN_INVALID
80 auth.logOut both
81 auth.recoverPassword user CODE_EMPTY CODE_EMPTY NEW_SETTINGS_INVALID
82 auth.requestPasswordRecovery user PASSWORD_EMPTY
83 auth.resendCode user PHONE_NUMBER_INVALID
84 auth.resetAuthorizations user TIMEOUT
87 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
88 bots.answerWebhookJSONQuery bot QUERY_ID_INVALID USER_BOT_INVALID
89 bots.sendCustomRequest bot USER_BOT_INVALID
90 bots.setBotCommands bot BOT_COMMAND_DESCRIPTION_INVALID BOT_COMMAND_INVALID BOT_COMMAND_DESCRIPTION_INVALID BOT_COMMAND_INVALID LANG_CODE_INVALID
91 channels.checkUsername user CHANNEL_INVALID CHAT_ID_INVALID USERNAME_INVALID
92 channels.createChannel user CHAT_TITLE_EMPTY USER_RESTRICTED
93 channels.deleteChannel user CHANNEL_INVALID CHANNEL_PRIVATE
338 stats.loadAsyncGraph user GRAPH_INVALID_RELOAD GRAPH_OUTDATED_RELOAD
339 stickers.addStickerToSet bot BOT_MISSING STICKERSET_INVALID STICKER_PNG_NOPNG STICKER_TGS_NOTGS
340 stickers.changeStickerPosition bot BOT_MISSING STICKER_INVALID
341 stickers.checkShortName both SHORT_NAME_OCCUPIED SHORT_NAME_INVALID SHORT_NAME_OCCUPIED
342 stickers.createStickerSet bot BOT_MISSING PACK_SHORT_NAME_INVALID PACK_SHORT_NAME_OCCUPIED PEER_ID_INVALID SHORTNAME_OCCUPY_FAILED STICKERS_EMPTY STICKER_EMOJI_INVALID STICKER_FILE_INVALID STICKER_PNG_DIMENSIONS STICKER_PNG_NOPNG STICKER_TGS_NOTGS STICKER_THUMB_PNG_NOPNG STICKER_THUMB_TGS_NOTGS USER_ID_INVALID
343 stickers.removeStickerFromSet bot BOT_MISSING STICKER_INVALID
344 stickers.setStickerSetThumb bot STICKER_THUMB_PNG_NOPNG STICKER_THUMB_TGS_NOTGS