Update to layer 148 and document new more errors (#3970)

This commit is contained in:
Shrimadhav U K
2022-11-06 00:39:08 +05:30
committed by GitHub
parent 073b87ba1f
commit fb43f638ff
3 changed files with 85 additions and 41 deletions

View File

@@ -67,6 +67,7 @@ CHAT_ABOUT_NOT_MODIFIED,400,About text has not changed
CHAT_ABOUT_TOO_LONG,400,Chat about too long
CHAT_ADMIN_INVITE_REQUIRED,403,You do not have the rights to do this
CHAT_ADMIN_REQUIRED,400,"Chat admin privileges are required to do that in the specified chat (for example, to send a message in a channel which is not yours), or invalid permissions used for the channel or group"
CHAT_DISCUSSION_UNALLOWED,400,
CHAT_FORBIDDEN,403,You cannot write in this chat
CHAT_FORWARDS_RESTRICTED,400,
CHAT_ID_EMPTY,400,The provided chat ID is empty
@@ -120,6 +121,7 @@ ENTITIES_TOO_LONG,400,It is no longer possible to send such long data inside ent
ENTITY_BOUNDS_INVALID,400,Some of provided entities have invalid bounds (length is zero or out of the boundaries of the string)
ENTITY_MENTION_USER_INVALID,400,You can't use this entity
ERROR_TEXT_EMPTY,400,The provided error message is empty
EXPIRE_DATE_INVALID,400,
EXPIRE_FORBIDDEN,400,
EXPORT_CARD_INVALID,400,Provided card is invalid
EXTERNAL_URL_INVALID,400,External URL invalid
@@ -229,6 +231,7 @@ NETWORK_MIGRATE_X,303,The source IP address is associated with DC {new_dc}
NEW_SALT_INVALID,400,The new salt is invalid
NEW_SETTINGS_INVALID,400,The new settings are invalid
NEXT_OFFSET_INVALID,400,The value for next_offset is invalid. Check that it has normal characters and is not too long
NOT_ALLOWED,403,
OFFSET_INVALID,400,"The given offset was invalid, it must be divisible by 1KB. See https://core.telegram.org/api/files#downloading-files"
OFFSET_PEER_ID_INVALID,400,The provided offset peer is invalid
OPTIONS_TOO_MUCH,400,You defined too many options for the poll
@@ -238,6 +241,7 @@ PACK_SHORT_NAME_OCCUPIED,400,A stickerpack with this name already exists
PARTICIPANTS_TOO_FEW,400,Not enough participants
PARTICIPANT_CALL_FAILED,500,Failure while making call
PARTICIPANT_JOIN_MISSING,403,
PARTICIPANT_ID_INVALID,400,
PARTICIPANT_VERSION_OUTDATED,400,The other participant does not use an up to date telegram client with support for calls
PASSWORD_EMPTY,400,The provided password is empty
PASSWORD_HASH_INVALID,400,The password (and thus its hash value) you entered is invalid
@@ -285,6 +289,7 @@ POLL_UNSUPPORTED,400,This layer does not support polls in the issued method
POLL_VOTE_REQUIRED,403,
POSTPONED_TIMEOUT,500,The postponed call has timed out
PREMIUM_ACCOUNT_REQUIRED,403,
PREMIUM_CURRENTLY_UNAVAILABLE,406,
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
@@ -326,6 +331,8 @@ SCHEDULE_STATUS_PRIVATE,400,You cannot schedule a message until the person comes
SCHEDULE_TOO_MUCH,400,You cannot schedule more messages in this chat (last known limit of 100 per chat)
SEARCH_QUERY_EMPTY,400,The search query is empty
SECONDS_INVALID,400,"Slow mode only supports certain values (e.g. 0, 10s, 30s, 1m, 5m, 15m and 1h)"
SEND_AS_PEER_INVALID,400,
SEND_CODE_UNAVAILABLE,406,
SEND_MESSAGE_MEDIA_INVALID,400,The message media was invalid or not specified
SEND_MESSAGE_TYPE_INVALID,400,The message type is invalid
SENSITIVE_CHANGE_FORBIDDEN,403,Your sensitive content settings cannot be changed at this time
@@ -370,6 +377,7 @@ THEME_MIME_INVALID,400,"You cannot create this theme, the mime-type is invalid"
TMP_PASSWORD_DISABLED,400,The temporary password is disabled
TMP_PASSWORD_INVALID,400,Password auth needs to be regenerated
TOKEN_INVALID,400,The provided token is invalid
TOPIC_DELETED,400,The topic was deleted
TTL_DAYS_INVALID,400,The provided TTL is invalid
TTL_MEDIA_INVALID,400,The provided media cannot be used with a TTL
TTL_PERIOD_INVALID,400,The provided TTL Period is invalid
@@ -378,6 +386,7 @@ TYPE_CONSTRUCTOR_INVALID,400,The type constructor is invalid
UNKNOWN_ERROR,400,
UNKNOWN_METHOD,500,The method you tried to call cannot be called on non-CDN DCs
UNTIL_DATE_INVALID,400,That date cannot be specified in this request (try using None)
UPDATE_APP_TO_LOGIN,406,
URL_INVALID,400,The URL used was invalid (e.g. when answering a callback with a URL that's not t.me/yourbot or your game's URL)
USER_VOLUME_INVALID,400,
USERNAME_INVALID,400,"Nobody is using this username, or the username is unacceptable. If the latter, it must match r""[a-zA-Z][\w\d]{3,30}[a-zA-Z\d]"""
1 name codes description
67 CHAT_ABOUT_TOO_LONG 400 Chat about too long
68 CHAT_ADMIN_INVITE_REQUIRED 403 You do not have the rights to do this
69 CHAT_ADMIN_REQUIRED 400 Chat admin privileges are required to do that in the specified chat (for example, to send a message in a channel which is not yours), or invalid permissions used for the channel or group
70 CHAT_DISCUSSION_UNALLOWED 400
71 CHAT_FORBIDDEN 403 You cannot write in this chat
72 CHAT_FORWARDS_RESTRICTED 400
73 CHAT_ID_EMPTY 400 The provided chat ID is empty
121 ENTITY_BOUNDS_INVALID 400 Some of provided entities have invalid bounds (length is zero or out of the boundaries of the string)
122 ENTITY_MENTION_USER_INVALID 400 You can't use this entity
123 ERROR_TEXT_EMPTY 400 The provided error message is empty
124 EXPIRE_DATE_INVALID 400
125 EXPIRE_FORBIDDEN 400
126 EXPORT_CARD_INVALID 400 Provided card is invalid
127 EXTERNAL_URL_INVALID 400 External URL invalid
231 NEW_SALT_INVALID 400 The new salt is invalid
232 NEW_SETTINGS_INVALID 400 The new settings are invalid
233 NEXT_OFFSET_INVALID 400 The value for next_offset is invalid. Check that it has normal characters and is not too long
234 NOT_ALLOWED 403
235 OFFSET_INVALID 400 The given offset was invalid, it must be divisible by 1KB. See https://core.telegram.org/api/files#downloading-files
236 OFFSET_PEER_ID_INVALID 400 The provided offset peer is invalid
237 OPTIONS_TOO_MUCH 400 You defined too many options for the poll
241 PARTICIPANTS_TOO_FEW 400 Not enough participants
242 PARTICIPANT_CALL_FAILED 500 Failure while making call
243 PARTICIPANT_JOIN_MISSING 403
244 PARTICIPANT_ID_INVALID 400
245 PARTICIPANT_VERSION_OUTDATED 400 The other participant does not use an up to date telegram client with support for calls
246 PASSWORD_EMPTY 400 The provided password is empty
247 PASSWORD_HASH_INVALID 400 The password (and thus its hash value) you entered is invalid
289 POLL_VOTE_REQUIRED 403
290 POSTPONED_TIMEOUT 500 The postponed call has timed out
291 PREMIUM_ACCOUNT_REQUIRED 403
292 PREMIUM_CURRENTLY_UNAVAILABLE 406
293 PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN 406 Similar to a flood wait, must wait {minutes} minutes
294 PRIVACY_KEY_INVALID 400 The privacy key is invalid
295 PRIVACY_TOO_LONG 400 Cannot add that many entities in a single request
331 SCHEDULE_TOO_MUCH 400 You cannot schedule more messages in this chat (last known limit of 100 per chat)
332 SEARCH_QUERY_EMPTY 400 The search query is empty
333 SECONDS_INVALID 400 Slow mode only supports certain values (e.g. 0, 10s, 30s, 1m, 5m, 15m and 1h)
334 SEND_AS_PEER_INVALID 400
335 SEND_CODE_UNAVAILABLE 406
336 SEND_MESSAGE_MEDIA_INVALID 400 The message media was invalid or not specified
337 SEND_MESSAGE_TYPE_INVALID 400 The message type is invalid
338 SENSITIVE_CHANGE_FORBIDDEN 403 Your sensitive content settings cannot be changed at this time
377 TMP_PASSWORD_DISABLED 400 The temporary password is disabled
378 TMP_PASSWORD_INVALID 400 Password auth needs to be regenerated
379 TOKEN_INVALID 400 The provided token is invalid
380 TOPIC_DELETED 400 The topic was deleted
381 TTL_DAYS_INVALID 400 The provided TTL is invalid
382 TTL_MEDIA_INVALID 400 The provided media cannot be used with a TTL
383 TTL_PERIOD_INVALID 400 The provided TTL Period is invalid
386 UNKNOWN_ERROR 400
387 UNKNOWN_METHOD 500 The method you tried to call cannot be called on non-CDN DCs
388 UNTIL_DATE_INVALID 400 That date cannot be specified in this request (try using None)
389 UPDATE_APP_TO_LOGIN 406
390 URL_INVALID 400 The URL used was invalid (e.g. when answering a callback with a URL that's not t.me/yourbot or your game's URL)
391 USER_VOLUME_INVALID 400
392 USERNAME_INVALID 400 Nobody is using this username, or the username is unacceptable. If the latter, it must match r"[a-zA-Z][\w\d]{3,30}[a-zA-Z\d]"