Update known errors and error message

Closes #1713
This commit is contained in:
Lonami Exo 2021-03-07 16:09:47 +01:00
parent 8724949b54
commit 3ee94bdc5e
2 changed files with 3 additions and 1 deletions

View File

@ -1274,7 +1274,7 @@ class ChatMethods:
"""
entity = await self.get_input_entity(entity)
if helpers._entity_type(entity) != helpers._EntityType.CHANNEL:
raise TypeError('You must pass a user entity')
raise TypeError('You must pass a channel entity')
# Don't bother fetching the Channel entity (costs a request), instead
# try to guess and if it fails we know it's the other one (best case

View File

@ -108,6 +108,7 @@ ENCRYPTION_OCCUPY_FAILED,500,TDLib developer claimed it is not an error while ac
ENTITIES_TOO_LONG,400,It is no longer possible to send such long data inside entity tags (for example inline text URLs)
ENTITY_MENTION_USER_INVALID,400,You can't use this entity
ERROR_TEXT_EMPTY,400,The provided error message is empty
EXPIRE_FORBIDDEN,400,
EXPORT_CARD_INVALID,400,Provided card is invalid
EXTERNAL_URL_INVALID,400,External URL invalid
FIELD_NAME_EMPTY,400,The field with the name FIELD_NAME is missing
@ -176,6 +177,7 @@ MEDIA_EMPTY,400,The provided media object is invalid or the current account may
MEDIA_INVALID,400,Media invalid
MEDIA_NEW_INVALID,400,The new media to edit the message with is invalid (such as stickers or voice notes)
MEDIA_PREV_INVALID,400,The old media cannot be edited with anything else (such as stickers or voice notes)
MEDIA_TTL_INVALID,400,
MEGAGROUP_ID_INVALID,400,The group is invalid
MEGAGROUP_PREHISTORY_HIDDEN,400,You can't set this discussion group because it's history is hidden
MEGAGROUP_REQUIRED,400,The request can only be used with a megagroup channel

1 name codes description
108 ENTITIES_TOO_LONG 400 It is no longer possible to send such long data inside entity tags (for example inline text URLs)
109 ENTITY_MENTION_USER_INVALID 400 You can't use this entity
110 ERROR_TEXT_EMPTY 400 The provided error message is empty
111 EXPIRE_FORBIDDEN 400
112 EXPORT_CARD_INVALID 400 Provided card is invalid
113 EXTERNAL_URL_INVALID 400 External URL invalid
114 FIELD_NAME_EMPTY 400 The field with the name FIELD_NAME is missing
177 MEDIA_INVALID 400 Media invalid
178 MEDIA_NEW_INVALID 400 The new media to edit the message with is invalid (such as stickers or voice notes)
179 MEDIA_PREV_INVALID 400 The old media cannot be edited with anything else (such as stickers or voice notes)
180 MEDIA_TTL_INVALID 400
181 MEGAGROUP_ID_INVALID 400 The group is invalid
182 MEGAGROUP_PREHISTORY_HIDDEN 400 You can't set this discussion group because it's history is hidden
183 MEGAGROUP_REQUIRED 400 The request can only be used with a megagroup channel