Document more RpcErrors (#3716)

This commit is contained in:
Devesh Pal 2022-02-11 01:58:52 +05:30 committed by GitHub
parent fedbfedfd5
commit a00f74285c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View File

@ -57,7 +57,9 @@ CALL_PEER_INVALID,400,The provided call peer object is invalid
CALL_PROTOCOL_FLAGS_INVALID,400,Call protocol flags invalid
CDN_METHOD_INVALID,400,This method cannot be invoked on a CDN server. Refer to https://core.telegram.org/cdn#schema for available methods
CHANNELS_ADMIN_PUBLIC_TOO_MUCH,400,"You're admin of too many public channels, make some channels private to change the username of this channel"
CHANNELS_ADMIN_LOCATED_TOO_MUCH,400,
CHANNELS_TOO_MUCH,400,You have joined too many channels/supergroups
CHANNEL_ADD_INVALID,400,
CHANNEL_BANNED,400,The channel is banned
CHANNEL_INVALID,400,"Invalid channel object. Make sure to pass the right types, for instance making sure that the request is designed for channels or otherwise look for a different one more suited"
CHANNEL_PRIVATE,400,The channel specified is private and you lack permission to access it. Another reason may be that you were banned from it
@ -345,12 +347,15 @@ SRP_ID_INVALID,400,
START_PARAM_EMPTY,400,The start parameter is empty
START_PARAM_INVALID,400,Start parameter invalid
STATS_MIGRATE_0,303,The channel statistics must be fetched from DC {dc}
STICKERPACK_STICKERS_TOO_MUCH,400,
STICKERSET_INVALID,400,The provided sticker set is invalid
STICKERSET_OWNER_ANONYMOUS,406,This sticker set can't be used as the group's official stickers because it was created by one of its anonymous admins
STICKERS_EMPTY,400,No sticker provided
STICKERS_TOO_MUCH,400,
STICKER_DOCUMENT_INVALID,400,"The sticker file was invalid (this file has failed Telegram internal checks, make sure to use the correct format and comply with https://core.telegram.org/animated_stickers)"
STICKER_EMOJI_INVALID,400,Sticker emoji invalid
STICKER_FILE_INVALID,400,Sticker file invalid
STICKER_GIF_DIMENSIONS,400,
STICKER_ID_INVALID,400,The provided sticker ID is invalid
STICKER_INVALID,400,The provided sticker is invalid
STICKER_PNG_DIMENSIONS,400,Sticker png dimensions invalid
@ -359,6 +364,8 @@ STICKER_TGS_NODOC,400,
STICKER_TGS_NOTGS,400,Stickers must be a tgs file but the used file was not a tgs
STICKER_THUMB_PNG_NOPNG,400,Stickerset thumb must be a png file but the used file was not png
STICKER_THUMB_TGS_NOTGS,400,Stickerset thumb must be a tgs file but the used file was not tgs
STICKER_VIDEO_NOWEBM,400,
STICKER_VIDEO_BIG,400,
STORAGE_CHECK_FAILED,500,Server storage check failed
STORE_INVALID_SCALAR_TYPE,500,
TAKEOUT_INIT_DELAY_0,420,A wait of {seconds} seconds is required before being able to initiate the takeout

1 name codes description
57 CALL_PROTOCOL_FLAGS_INVALID 400 Call protocol flags invalid
58 CDN_METHOD_INVALID 400 This method cannot be invoked on a CDN server. Refer to https://core.telegram.org/cdn#schema for available methods
59 CHANNELS_ADMIN_PUBLIC_TOO_MUCH 400 You're admin of too many public channels, make some channels private to change the username of this channel
60 CHANNELS_ADMIN_LOCATED_TOO_MUCH 400
61 CHANNELS_TOO_MUCH 400 You have joined too many channels/supergroups
62 CHANNEL_ADD_INVALID 400
63 CHANNEL_BANNED 400 The channel is banned
64 CHANNEL_INVALID 400 Invalid channel object. Make sure to pass the right types, for instance making sure that the request is designed for channels or otherwise look for a different one more suited
65 CHANNEL_PRIVATE 400 The channel specified is private and you lack permission to access it. Another reason may be that you were banned from it
347 START_PARAM_EMPTY 400 The start parameter is empty
348 START_PARAM_INVALID 400 Start parameter invalid
349 STATS_MIGRATE_0 303 The channel statistics must be fetched from DC {dc}
350 STICKERPACK_STICKERS_TOO_MUCH 400
351 STICKERSET_INVALID 400 The provided sticker set is invalid
352 STICKERSET_OWNER_ANONYMOUS 406 This sticker set can't be used as the group's official stickers because it was created by one of its anonymous admins
353 STICKERS_EMPTY 400 No sticker provided
354 STICKERS_TOO_MUCH 400
355 STICKER_DOCUMENT_INVALID 400 The sticker file was invalid (this file has failed Telegram internal checks, make sure to use the correct format and comply with https://core.telegram.org/animated_stickers)
356 STICKER_EMOJI_INVALID 400 Sticker emoji invalid
357 STICKER_FILE_INVALID 400 Sticker file invalid
358 STICKER_GIF_DIMENSIONS 400
359 STICKER_ID_INVALID 400 The provided sticker ID is invalid
360 STICKER_INVALID 400 The provided sticker is invalid
361 STICKER_PNG_DIMENSIONS 400 Sticker png dimensions invalid
364 STICKER_TGS_NOTGS 400 Stickers must be a tgs file but the used file was not a tgs
365 STICKER_THUMB_PNG_NOPNG 400 Stickerset thumb must be a png file but the used file was not png
366 STICKER_THUMB_TGS_NOTGS 400 Stickerset thumb must be a tgs file but the used file was not tgs
367 STICKER_VIDEO_NOWEBM 400
368 STICKER_VIDEO_BIG 400
369 STORAGE_CHECK_FAILED 500 Server storage check failed
370 STORE_INVALID_SCALAR_TYPE 500
371 TAKEOUT_INIT_DELAY_0 420 A wait of {seconds} seconds is required before being able to initiate the takeout

View File

@ -90,13 +90,13 @@ 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.createChannel,user,CHANNELS_ADMIN_LOCATED_TOO_MUCH CHAT_TITLE_EMPTY USER_RESTRICTED
channels.deleteChannel,user,CHANNEL_INVALID CHANNEL_PRIVATE CHANNEL_TOO_LARGE
channels.deleteHistory,user,
channels.deleteMessages,both,CHANNEL_INVALID CHANNEL_PRIVATE MESSAGE_DELETE_FORBIDDEN
channels.deleteUserHistory,user,CHANNEL_INVALID CHAT_ADMIN_REQUIRED
channels.editAdmin,both,ADMINS_TOO_MUCH ADMIN_RANK_EMOJI_NOT_ALLOWED ADMIN_RANK_INVALID BOT_CHANNELS_NA CHANNEL_INVALID CHAT_ADMIN_INVITE_REQUIRED CHAT_ADMIN_REQUIRED FRESH_CHANGE_ADMINS_FORBIDDEN RIGHT_FORBIDDEN USER_CREATOR USER_ID_INVALID USER_NOT_MUTUAL_CONTACT USER_PRIVACY_RESTRICTED
channels.editBanned,both,CHANNEL_INVALID CHANNEL_PRIVATE CHAT_ADMIN_REQUIRED USER_ADMIN_INVALID USER_ID_INVALID
channels.editBanned,both,CHANNEL_INVALID CHANNEL_ADD_INVALID CHANNEL_PRIVATE CHAT_ADMIN_REQUIRED USER_ADMIN_INVALID USER_ID_INVALID
channels.editCreator,user,PASSWORD_MISSING PASSWORD_TOO_FRESH_0 SESSION_TOO_FRESH_0 SRP_ID_INVALID
channels.editLocation,user,
channels.editPhoto,both,CHANNEL_INVALID CHAT_ADMIN_REQUIRED FILE_REFERENCE_INVALID PHOTO_INVALID
@ -341,10 +341,10 @@ setClientDHParams,both,
stats.getBroadcastStats,user,BROADCAST_REQUIRED CHAT_ADMIN_REQUIRED CHP_CALL_FAIL STATS_MIGRATE_0
stats.getMegagroupStats,user,CHAT_ADMIN_REQUIRED MEGAGROUP_REQUIRED STATS_MIGRATE_0
stats.loadAsyncGraph,user,GRAPH_INVALID_RELOAD GRAPH_OUTDATED_RELOAD
stickers.addStickerToSet,bot,BOT_MISSING STICKERSET_INVALID STICKER_PNG_NOPNG STICKER_TGS_NOTGS
stickers.addStickerToSet,bot,BOT_MISSING STICKERS_TOO_MUCH STICKERSET_INVALID STICKERPACK_STICKERS_TOO_MUCH STICKER_PNG_NOPNG STICKER_TGS_NOTGS
stickers.changeStickerPosition,bot,BOT_MISSING STICKER_INVALID
stickers.checkShortName,user,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.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_GIF_DIMENSIONS STICKER_PNG_DIMENSIONS STICKER_PNG_NOPNG STICKER_TGS_NOTGS STICKER_THUMB_PNG_NOPNG STICKER_THUMB_TGS_NOTGS STICKER_VIDEO_BIG STICKER_VIDEO_NOWEBM USER_ID_INVALID
stickers.removeStickerFromSet,bot,BOT_MISSING STICKER_INVALID
stickers.setStickerSetThumb,bot,STICKER_THUMB_PNG_NOPNG STICKER_THUMB_TGS_NOTGS
stickers.suggestShortName,user,TITLE_INVALID

1 method usability errors
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 CHANNELS_ADMIN_LOCATED_TOO_MUCH CHAT_TITLE_EMPTY USER_RESTRICTED
94 channels.deleteChannel user CHANNEL_INVALID CHANNEL_PRIVATE CHANNEL_TOO_LARGE
95 channels.deleteHistory user
96 channels.deleteMessages both CHANNEL_INVALID CHANNEL_PRIVATE MESSAGE_DELETE_FORBIDDEN
97 channels.deleteUserHistory user CHANNEL_INVALID CHAT_ADMIN_REQUIRED
98 channels.editAdmin both ADMINS_TOO_MUCH ADMIN_RANK_EMOJI_NOT_ALLOWED ADMIN_RANK_INVALID BOT_CHANNELS_NA CHANNEL_INVALID CHAT_ADMIN_INVITE_REQUIRED CHAT_ADMIN_REQUIRED FRESH_CHANGE_ADMINS_FORBIDDEN RIGHT_FORBIDDEN USER_CREATOR USER_ID_INVALID USER_NOT_MUTUAL_CONTACT USER_PRIVACY_RESTRICTED
99 channels.editBanned both CHANNEL_INVALID CHANNEL_PRIVATE CHAT_ADMIN_REQUIRED USER_ADMIN_INVALID USER_ID_INVALID CHANNEL_INVALID CHANNEL_ADD_INVALID CHANNEL_PRIVATE CHAT_ADMIN_REQUIRED USER_ADMIN_INVALID USER_ID_INVALID
100 channels.editCreator user PASSWORD_MISSING PASSWORD_TOO_FRESH_0 SESSION_TOO_FRESH_0 SRP_ID_INVALID
101 channels.editLocation user
102 channels.editPhoto both CHANNEL_INVALID CHAT_ADMIN_REQUIRED FILE_REFERENCE_INVALID PHOTO_INVALID
341 stats.getBroadcastStats user BROADCAST_REQUIRED CHAT_ADMIN_REQUIRED CHP_CALL_FAIL STATS_MIGRATE_0
342 stats.getMegagroupStats user CHAT_ADMIN_REQUIRED MEGAGROUP_REQUIRED STATS_MIGRATE_0
343 stats.loadAsyncGraph user GRAPH_INVALID_RELOAD GRAPH_OUTDATED_RELOAD
344 stickers.addStickerToSet bot BOT_MISSING STICKERSET_INVALID STICKER_PNG_NOPNG STICKER_TGS_NOTGS BOT_MISSING STICKERS_TOO_MUCH STICKERSET_INVALID STICKERPACK_STICKERS_TOO_MUCH STICKER_PNG_NOPNG STICKER_TGS_NOTGS
345 stickers.changeStickerPosition bot BOT_MISSING STICKER_INVALID
346 stickers.checkShortName user SHORT_NAME_INVALID SHORT_NAME_OCCUPIED
347 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 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_GIF_DIMENSIONS STICKER_PNG_DIMENSIONS STICKER_PNG_NOPNG STICKER_TGS_NOTGS STICKER_THUMB_PNG_NOPNG STICKER_THUMB_TGS_NOTGS STICKER_VIDEO_BIG STICKER_VIDEO_NOWEBM USER_ID_INVALID
348 stickers.removeStickerFromSet bot BOT_MISSING STICKER_INVALID
349 stickers.setStickerSetThumb bot STICKER_THUMB_PNG_NOPNG STICKER_THUMB_TGS_NOTGS
350 stickers.suggestShortName user TITLE_INVALID