Add new known RPC errors (#3134)

This commit is contained in:
Shrimadhav U K 2021-08-20 15:19:12 +05:30 committed by GitHub
parent 45ed6658fe
commit 6a1f29d953
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View File

@ -133,6 +133,7 @@ FILE_PART_X_MISSING,400,Part {which} of the file is missing from storage
FILE_REFERENCE_EMPTY,400,The file reference must exist to access the media and it cannot be empty
FILE_REFERENCE_EXPIRED,400,The file reference has expired and is no longer valid or it belongs to self-destructing media and cannot be resent
FILE_REFERENCE_INVALID,400,The file reference is invalid or you can't do that operation on such message
FILE_TITLE_EMPTY,400,
FIRSTNAME_INVALID,400,The first name is invalid
FLOOD_TEST_PHONE_WAIT_X,420,A wait of {seconds} seconds is required in the test servers
FLOOD_WAIT_X,420,A wait of {seconds} seconds is required
@ -231,6 +232,7 @@ 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_RECOVERY_NA,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
@ -263,16 +265,19 @@ PHOTO_INVALID_DIMENSIONS,400,The photo dimensions are invalid (hint: `pip instal
PHOTO_SAVE_FILE_INVALID,400,The photo you tried to send cannot be saved by Telegram. A reason may be that it exceeds 10MB. Try resizing it locally
PHOTO_THUMB_URL_EMPTY,400,The URL used as a thumbnail appears to be empty or has caused another HTTP error
PIN_RESTRICTED,400,You can't pin messages in private chats with other people
PINNED_DIALOGS_TOO_MUCH,400,
POLL_ANSWERS_INVALID,400,The poll did not have enough answers or had too many
POLL_OPTION_DUPLICATE,400,A duplicate option was sent in the same poll
POLL_OPTION_INVALID,400,A poll option used invalid data (the data may be too long)
POLL_QUESTION_INVALID,400,The poll question was either empty or too long
POLL_UNSUPPORTED,400,This layer does not support polls in the issued method
POLL_VOTE_REQUIRED,403,
PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN,406,"Similar to a flood wait, must wait {minutes} minutes"
PRIVACY_KEY_INVALID,400,The privacy key is invalid
PRIVACY_TOO_LONG,400,Cannot add that many entities in a single request
PRIVACY_VALUE_INVALID,400,The privacy value is invalid
PTS_CHANGE_EMPTY,500,No PTS change
PUBLIC_KEY_REQUIRED,400,
QUERY_ID_EMPTY,400,The query ID is empty
QUERY_ID_INVALID,400,The query ID is invalid
QUERY_TOO_SHORT,400,The query string is too short

1 name codes description
133 FILE_REFERENCE_EMPTY 400 The file reference must exist to access the media and it cannot be empty
134 FILE_REFERENCE_EXPIRED 400 The file reference has expired and is no longer valid or it belongs to self-destructing media and cannot be resent
135 FILE_REFERENCE_INVALID 400 The file reference is invalid or you can't do that operation on such message
136 FILE_TITLE_EMPTY 400
137 FIRSTNAME_INVALID 400 The first name is invalid
138 FLOOD_TEST_PHONE_WAIT_X 420 A wait of {seconds} seconds is required in the test servers
139 FLOOD_WAIT_X 420 A wait of {seconds} seconds is required
232 PASSWORD_HASH_INVALID 400 The password (and thus its hash value) you entered is invalid
233 PASSWORD_MISSING 400 The account must have 2-factor authentication enabled (a password) before this method can be used
234 PASSWORD_RECOVERY_EXPIRED 400
235 PASSWORD_RECOVERY_NA 400
236 PASSWORD_REQUIRED 400 The account must have 2-factor authentication enabled (a password) before this method can be used
237 PASSWORD_TOO_FRESH_X 400 The password was added too recently and {seconds} seconds must pass before using the method
238 PAYMENT_PROVIDER_INVALID 400 The payment provider was not recognised or its token was invalid
265 PHOTO_SAVE_FILE_INVALID 400 The photo you tried to send cannot be saved by Telegram. A reason may be that it exceeds 10MB. Try resizing it locally
266 PHOTO_THUMB_URL_EMPTY 400 The URL used as a thumbnail appears to be empty or has caused another HTTP error
267 PIN_RESTRICTED 400 You can't pin messages in private chats with other people
268 PINNED_DIALOGS_TOO_MUCH 400
269 POLL_ANSWERS_INVALID 400 The poll did not have enough answers or had too many
270 POLL_OPTION_DUPLICATE 400 A duplicate option was sent in the same poll
271 POLL_OPTION_INVALID 400 A poll option used invalid data (the data may be too long)
272 POLL_QUESTION_INVALID 400 The poll question was either empty or too long
273 POLL_UNSUPPORTED 400 This layer does not support polls in the issued method
274 POLL_VOTE_REQUIRED 403
275 PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN 406 Similar to a flood wait, must wait {minutes} minutes
276 PRIVACY_KEY_INVALID 400 The privacy key is invalid
277 PRIVACY_TOO_LONG 400 Cannot add that many entities in a single request
278 PRIVACY_VALUE_INVALID 400 The privacy value is invalid
279 PTS_CHANGE_EMPTY 500 No PTS change
280 PUBLIC_KEY_REQUIRED 400
281 QUERY_ID_EMPTY 400 The query ID is empty
282 QUERY_ID_INVALID 400 The query ID is invalid
283 QUERY_TOO_SHORT 400 The query string is too short

View File

@ -12,7 +12,7 @@ account.deleteSecureValue,user,
account.finishTakeoutSession,user,
account.getAccountTTL,user,
account.getAllSecureValues,user,
account.getAuthorizationForm,user,
account.getAuthorizationForm,user,PUBLIC_KEY_REQUIRED
account.getAuthorizations,user,
account.getAutoDownloadSettings,user,
account.getContactSignUpNotification,user,
@ -79,7 +79,7 @@ auth.importBotAuthorization,both,ACCESS_TOKEN_EXPIRED ACCESS_TOKEN_INVALID API_I
auth.importLoginToken,user,AUTH_TOKEN_ALREADY_ACCEPTED AUTH_TOKEN_EXPIRED AUTH_TOKEN_INVALID
auth.logOut,both,
auth.recoverPassword,user,CODE_EMPTY NEW_SETTINGS_INVALID
auth.requestPasswordRecovery,user,PASSWORD_EMPTY
auth.requestPasswordRecovery,user,PASSWORD_EMPTY PASSWORD_RECOVERY_NA
auth.resendCode,user,PHONE_NUMBER_INVALID
auth.resetAuthorizations,user,TIMEOUT
auth.sendCode,user,API_ID_INVALID API_ID_PUBLISHED_FLOOD AUTH_RESTART INPUT_REQUEST_TOO_LONG PHONE_NUMBER_APP_SIGNUP_FORBIDDEN PHONE_NUMBER_BANNED PHONE_NUMBER_FLOOD PHONE_NUMBER_INVALID PHONE_PASSWORD_FLOOD PHONE_PASSWORD_PROTECTED
@ -89,6 +89,7 @@ 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 LANG_CODE_INVALID
channels.checkUsername,user,CHANNEL_INVALID CHAT_ID_INVALID USERNAME_INVALID
channels.convertToGigagroup,user,PARTICIPANTS_TOO_FEW
channels.createChannel,user,CHAT_TITLE_EMPTY USER_RESTRICTED
channels.deleteChannel,user,CHANNEL_INVALID CHANNEL_PRIVATE
channels.deleteHistory,user,
@ -231,7 +232,7 @@ messages.getPeerDialogs,user,CHANNEL_PRIVATE PEER_ID_INVALID
messages.getPeerSettings,user,CHANNEL_INVALID PEER_ID_INVALID
messages.getPinnedDialogs,user,
messages.getPollResults,user,
messages.getPollVotes,user,BROADCAST_FORBIDDEN
messages.getPollVotes,user,BROADCAST_FORBIDDEN POLL_VOTE_REQUIRED
messages.getRecentLocations,user,
messages.getRecentStickers,user,
messages.getSavedGifs,user,
@ -288,12 +289,12 @@ messages.setBotShippingResults,both,QUERY_ID_INVALID
messages.setEncryptedTyping,user,CHAT_ID_INVALID
messages.setGameScore,bot,PEER_ID_INVALID USER_BOT_REQUIRED
messages.setHistoryTTL,user,CHAT_NOT_MODIFIED TTL_PERIOD_INVALID
messages.setInlineBotResults,bot,ARTICLE_TITLE_EMPTY AUDIO_CONTENT_URL_EMPTY AUDIO_TITLE_EMPTY BUTTON_DATA_INVALID BUTTON_TYPE_INVALID BUTTON_URL_INVALID DOCUMENT_INVALID FILE_CONTENT_TYPE_INVALID GIF_CONTENT_TYPE_INVALID MESSAGE_EMPTY NEXT_OFFSET_INVALID PHOTO_CONTENT_TYPE_INVALID PHOTO_CONTENT_URL_EMPTY PHOTO_THUMB_URL_EMPTY QUERY_ID_INVALID REPLY_MARKUP_INVALID RESULT_TYPE_INVALID SEND_MESSAGE_MEDIA_INVALID SEND_MESSAGE_TYPE_INVALID START_PARAM_INVALID STICKER_DOCUMENT_INVALID USER_BOT_INVALID VIDEO_TITLE_EMPTY WEBDOCUMENT_MIME_INVALID WEBDOCUMENT_URL_INVALID
messages.setInlineBotResults,bot,ARTICLE_TITLE_EMPTY AUDIO_CONTENT_URL_EMPTY AUDIO_TITLE_EMPTY BUTTON_DATA_INVALID BUTTON_TYPE_INVALID BUTTON_URL_INVALID DOCUMENT_INVALID FILE_CONTENT_TYPE_INVALID FILE_TITLE_EMPTY GIF_CONTENT_TYPE_INVALID MESSAGE_EMPTY NEXT_OFFSET_INVALID PHOTO_CONTENT_TYPE_INVALID PHOTO_CONTENT_URL_EMPTY PHOTO_THUMB_URL_EMPTY QUERY_ID_INVALID REPLY_MARKUP_INVALID RESULT_TYPE_INVALID SEND_MESSAGE_MEDIA_INVALID SEND_MESSAGE_TYPE_INVALID START_PARAM_INVALID STICKER_DOCUMENT_INVALID USER_BOT_INVALID VIDEO_TITLE_EMPTY WEBDOCUMENT_MIME_INVALID WEBDOCUMENT_URL_INVALID
messages.setInlineGameScore,bot,MESSAGE_ID_INVALID USER_BOT_REQUIRED
messages.setTyping,both,CHANNEL_INVALID CHANNEL_PRIVATE CHAT_ID_INVALID CHAT_WRITE_FORBIDDEN PEER_ID_INVALID USER_BANNED_IN_CHANNEL USER_IS_BLOCKED USER_IS_BOT
messages.startBot,user,BOT_INVALID PEER_ID_INVALID START_PARAM_EMPTY START_PARAM_INVALID
messages.startHistoryImport,user,IMPORT_ID_INVALID
messages.toggleDialogPin,user,PEER_ID_INVALID
messages.toggleDialogPin,user,PEER_ID_INVALID PINNED_DIALOGS_TOO_MUCH
messages.toggleStickerSets,user,
messages.uninstallStickerSet,user,STICKERSET_INVALID
messages.updateDialogFilter,user,

1 method usability errors
12 account.finishTakeoutSession user
13 account.getAccountTTL user
14 account.getAllSecureValues user
15 account.getAuthorizationForm user PUBLIC_KEY_REQUIRED
16 account.getAuthorizations user
17 account.getAutoDownloadSettings user
18 account.getContactSignUpNotification user
79 auth.importLoginToken user AUTH_TOKEN_ALREADY_ACCEPTED AUTH_TOKEN_EXPIRED AUTH_TOKEN_INVALID
80 auth.logOut both
81 auth.recoverPassword user CODE_EMPTY NEW_SETTINGS_INVALID
82 auth.requestPasswordRecovery user PASSWORD_EMPTY PASSWORD_EMPTY PASSWORD_RECOVERY_NA
83 auth.resendCode user PHONE_NUMBER_INVALID
84 auth.resetAuthorizations user TIMEOUT
85 auth.sendCode user API_ID_INVALID API_ID_PUBLISHED_FLOOD AUTH_RESTART INPUT_REQUEST_TOO_LONG PHONE_NUMBER_APP_SIGNUP_FORBIDDEN PHONE_NUMBER_BANNED PHONE_NUMBER_FLOOD PHONE_NUMBER_INVALID PHONE_PASSWORD_FLOOD PHONE_PASSWORD_PROTECTED
89 bots.sendCustomRequest bot USER_BOT_INVALID
90 bots.setBotCommands bot BOT_COMMAND_DESCRIPTION_INVALID BOT_COMMAND_INVALID LANG_CODE_INVALID
91 channels.checkUsername user CHANNEL_INVALID CHAT_ID_INVALID USERNAME_INVALID
92 channels.convertToGigagroup user PARTICIPANTS_TOO_FEW
93 channels.createChannel user CHAT_TITLE_EMPTY USER_RESTRICTED
94 channels.deleteChannel user CHANNEL_INVALID CHANNEL_PRIVATE
95 channels.deleteHistory user
232 messages.getPeerSettings user CHANNEL_INVALID PEER_ID_INVALID
233 messages.getPinnedDialogs user
234 messages.getPollResults user
235 messages.getPollVotes user BROADCAST_FORBIDDEN BROADCAST_FORBIDDEN POLL_VOTE_REQUIRED
236 messages.getRecentLocations user
237 messages.getRecentStickers user
238 messages.getSavedGifs user
289 messages.setEncryptedTyping user CHAT_ID_INVALID
290 messages.setGameScore bot PEER_ID_INVALID USER_BOT_REQUIRED
291 messages.setHistoryTTL user CHAT_NOT_MODIFIED TTL_PERIOD_INVALID
292 messages.setInlineBotResults bot ARTICLE_TITLE_EMPTY AUDIO_CONTENT_URL_EMPTY AUDIO_TITLE_EMPTY BUTTON_DATA_INVALID BUTTON_TYPE_INVALID BUTTON_URL_INVALID DOCUMENT_INVALID FILE_CONTENT_TYPE_INVALID GIF_CONTENT_TYPE_INVALID MESSAGE_EMPTY NEXT_OFFSET_INVALID PHOTO_CONTENT_TYPE_INVALID PHOTO_CONTENT_URL_EMPTY PHOTO_THUMB_URL_EMPTY QUERY_ID_INVALID REPLY_MARKUP_INVALID RESULT_TYPE_INVALID SEND_MESSAGE_MEDIA_INVALID SEND_MESSAGE_TYPE_INVALID START_PARAM_INVALID STICKER_DOCUMENT_INVALID USER_BOT_INVALID VIDEO_TITLE_EMPTY WEBDOCUMENT_MIME_INVALID WEBDOCUMENT_URL_INVALID ARTICLE_TITLE_EMPTY AUDIO_CONTENT_URL_EMPTY AUDIO_TITLE_EMPTY BUTTON_DATA_INVALID BUTTON_TYPE_INVALID BUTTON_URL_INVALID DOCUMENT_INVALID FILE_CONTENT_TYPE_INVALID FILE_TITLE_EMPTY GIF_CONTENT_TYPE_INVALID MESSAGE_EMPTY NEXT_OFFSET_INVALID PHOTO_CONTENT_TYPE_INVALID PHOTO_CONTENT_URL_EMPTY PHOTO_THUMB_URL_EMPTY QUERY_ID_INVALID REPLY_MARKUP_INVALID RESULT_TYPE_INVALID SEND_MESSAGE_MEDIA_INVALID SEND_MESSAGE_TYPE_INVALID START_PARAM_INVALID STICKER_DOCUMENT_INVALID USER_BOT_INVALID VIDEO_TITLE_EMPTY WEBDOCUMENT_MIME_INVALID WEBDOCUMENT_URL_INVALID
293 messages.setInlineGameScore bot MESSAGE_ID_INVALID USER_BOT_REQUIRED
294 messages.setTyping both CHANNEL_INVALID CHANNEL_PRIVATE CHAT_ID_INVALID CHAT_WRITE_FORBIDDEN PEER_ID_INVALID USER_BANNED_IN_CHANNEL USER_IS_BLOCKED USER_IS_BOT
295 messages.startBot user BOT_INVALID PEER_ID_INVALID START_PARAM_EMPTY START_PARAM_INVALID
296 messages.startHistoryImport user IMPORT_ID_INVALID
297 messages.toggleDialogPin user PEER_ID_INVALID PEER_ID_INVALID PINNED_DIALOGS_TOO_MUCH
298 messages.toggleStickerSets user
299 messages.uninstallStickerSet user STICKERSET_INVALID
300 messages.updateDialogFilter user