Add new known errors (#1196)

This commit is contained in:
Manuel1510 2019-06-01 15:49:12 +02:00 committed by Lonami
parent 30a0e39060
commit 27360242b0
2 changed files with 4 additions and 1 deletions

View File

@ -44,6 +44,7 @@ CHAT_FORBIDDEN,,You cannot write in this chat
CHAT_ID_EMPTY,400,The provided chat ID is empty
CHAT_ID_INVALID,400,"Invalid object ID for a chat. Make sure to pass the right types, for instance making sure that the request is designed for chats (not channels/megagroups) or otherwise look for a different one more suited\nAn example working with a megagroup and AddChatUserRequest, it will fail because megagroups are channels. Use InviteToChannelRequest instead"
CHAT_INVALID,400,The chat is invalid for this request
CHAT_LINK_EXISTS,400,The chat is linked to a channel and cannot be used in that request
CHAT_NOT_MODIFIED,400,"The chat or channel wasn't modified (title, invites, username, admins, etc. are the same)"
CHAT_RESTRICTED,400,The chat is restricted and cannot be used in that request
CHAT_SEND_GIFS_FORBIDDEN,403,You can't send gifs in this chat
@ -130,6 +131,7 @@ MEDIA_EMPTY,400,The provided media object is invalid
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)
MEGAGROUP_PREHISTORY_HIDDEN,400,You can't set this discussion group because it's history is hidden
MEMBER_NO_LOCATION,500,An internal failure occurred while fetching user info (couldn't find location)
MEMBER_OCCUPY_PRIMARY_LOC_FAILED,500,Occupation of primary member location failed
MESSAGE_AUTHOR_REQUIRED,403,Message author required

1 name codes description
44 CHAT_ID_EMPTY 400 The provided chat ID is empty
45 CHAT_ID_INVALID 400 Invalid object ID for a chat. Make sure to pass the right types, for instance making sure that the request is designed for chats (not channels/megagroups) or otherwise look for a different one more suited\nAn example working with a megagroup and AddChatUserRequest, it will fail because megagroups are channels. Use InviteToChannelRequest instead
46 CHAT_INVALID 400 The chat is invalid for this request
47 CHAT_LINK_EXISTS 400 The chat is linked to a channel and cannot be used in that request
48 CHAT_NOT_MODIFIED 400 The chat or channel wasn't modified (title, invites, username, admins, etc. are the same)
49 CHAT_RESTRICTED 400 The chat is restricted and cannot be used in that request
50 CHAT_SEND_GIFS_FORBIDDEN 403 You can't send gifs in this chat
131 MEDIA_INVALID 400 Media invalid
132 MEDIA_NEW_INVALID 400 The new media to edit the message with is invalid (such as stickers or voice notes)
133 MEDIA_PREV_INVALID 400 The old media cannot be edited with anything else (such as stickers or voice notes)
134 MEGAGROUP_PREHISTORY_HIDDEN 400 You can't set this discussion group because it's history is hidden
135 MEMBER_NO_LOCATION 500 An internal failure occurred while fetching user info (couldn't find location)
136 MEMBER_OCCUPY_PRIMARY_LOC_FAILED 500 Occupation of primary member location failed
137 MESSAGE_AUTHOR_REQUIRED 403 Message author required

View File

@ -93,8 +93,9 @@ channels.leaveChannel,both,CHANNEL_INVALID CHANNEL_PRIVATE CHANNEL_PUBLIC_GROUP_
channels.readHistory,user,CHANNEL_INVALID CHANNEL_PRIVATE
channels.readMessageContents,user,CHANNEL_INVALID CHANNEL_PRIVATE
channels.reportSpam,user,CHANNEL_INVALID INPUT_USER_DEACTIVATED
channels.setDiscussionGroup,user,MEGAGROUP_PREHISTORY_HIDDEN
channels.setStickers,both,CHANNEL_INVALID PARTICIPANTS_TOO_FEW
channels.togglePreHistoryHidden,user,
channels.togglePreHistoryHidden,user,CHAT_LINK_EXISTS
channels.toggleSignatures,user,CHANNEL_INVALID
channels.updateUsername,user,CHANNELS_ADMIN_PUBLIC_TOO_MUCH CHANNEL_INVALID CHAT_ADMIN_REQUIRED USERNAME_INVALID USERNAME_OCCUPIED
contacts.block,user,CONTACT_ID_INVALID

1 method usability errors
93 channels.readHistory user CHANNEL_INVALID CHANNEL_PRIVATE
94 channels.readMessageContents user CHANNEL_INVALID CHANNEL_PRIVATE
95 channels.reportSpam user CHANNEL_INVALID INPUT_USER_DEACTIVATED
96 channels.setDiscussionGroup user MEGAGROUP_PREHISTORY_HIDDEN
97 channels.setStickers both CHANNEL_INVALID PARTICIPANTS_TOO_FEW
98 channels.togglePreHistoryHidden user CHAT_LINK_EXISTS
99 channels.toggleSignatures user CHANNEL_INVALID
100 channels.updateUsername user CHANNELS_ADMIN_PUBLIC_TOO_MUCH CHANNEL_INVALID CHAT_ADMIN_REQUIRED USERNAME_INVALID USERNAME_OCCUPIED
101 contacts.block user CONTACT_ID_INVALID