Document more RPC errors

Closes #3163.
This commit is contained in:
Lonami Exo
2022-01-24 14:32:45 +01:00
parent 3c7bb53c3c
commit 0eadca670f
2 changed files with 13 additions and 5 deletions

View File

@@ -41,6 +41,7 @@ BOT_MISSING,400,This method can only be run by a bot
BOT_PAYMENTS_DISABLED,400,This method can only be run by a bot
BOT_POLLS_DISABLED,400,You cannot create polls under a bot account
BOT_RESPONSE_TIMEOUT,400,The bot did not answer to the callback query in time
BOT_SCORE_NOT_MODIFIED,400,
BROADCAST_CALLS_DISABLED,400,
BROADCAST_FORBIDDEN,403,The request cannot be used in broadcast channels
BROADCAST_ID_INVALID,400,The channel is invalid
@@ -140,6 +141,7 @@ FILE_REFERENCE_EXPIRED,400,The file reference has expired and is no longer valid
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
FILTER_NOT_SUPPORTED,400,
FLOOD_TEST_PHONE_WAIT_0,420,A wait of {seconds} seconds is required in the test servers
FLOOD_WAIT_0,420,A wait of {seconds} seconds is required
FOLDER_ID_EMPTY,400,The folder you tried to delete was already empty
@@ -274,6 +276,7 @@ PHOTO_SAVE_FILE_INVALID,400,The photo you tried to send cannot be saved by Teleg
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_ANSWER_INVALID,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)
@@ -310,6 +313,7 @@ RESULTS_TOO_MUCH,400,"You sent too many results, see https://core.telegram.org/b
RESULT_ID_DUPLICATE,400,Duplicated IDs on the sent results. Make sure to use unique IDs
RESULT_ID_INVALID,400,The given result cannot be used to send the selection to the bot
RESULT_TYPE_INVALID,400,Result type invalid
REVOTE_NOT_ALLOWED,400,
RIGHT_FORBIDDEN,403,Either your admin rights do not allow you to do this or you passed the wrong rights combination (some rights only apply to channels and vice versa)
RPC_CALL_FAIL,500,"Telegram is having internal issues, please try again later."
RPC_MCGET_FAIL,500,"Telegram is having internal issues, please try again later."
@@ -319,6 +323,7 @@ SCHEDULE_DATE_INVALID,400,
SCHEDULE_DATE_TOO_LATE,400,The date you tried to schedule is too far in the future (last known limit of 1 year and a few hours)
SCHEDULE_STATUS_PRIVATE,400,You cannot schedule a message until the person comes online if their privacy does not show this information
SCHEDULE_TOO_MUCH,400,You cannot schedule more messages in this chat (last known limit of 100 per chat)
SCORE_INVALID,400,
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,,
@@ -334,6 +339,7 @@ SHA256_HASH_INVALID,400,The provided SHA256 hash is invalid
SHORTNAME_OCCUPY_FAILED,400,An error occurred when trying to register the short-name used for the sticker pack. Try a different name
SHORT_NAME_INVALID,400,
SHORT_NAME_OCCUPIED,400,
SLOWMODE_MULTI_MSGS_DISABLED,400,
SLOWMODE_WAIT_0,420,A wait of {seconds} seconds is required before sending another message in this chat
SRP_ID_INVALID,400,
START_PARAM_EMPTY,400,The start parameter is empty
@@ -376,6 +382,7 @@ 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)
USAGE_LIMIT_INVALID,400,
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]"""
USERNAME_NOT_MODIFIED,400,The username is not different from the current username
1 name codes description
41 BOT_PAYMENTS_DISABLED 400 This method can only be run by a bot
42 BOT_POLLS_DISABLED 400 You cannot create polls under a bot account
43 BOT_RESPONSE_TIMEOUT 400 The bot did not answer to the callback query in time
44 BOT_SCORE_NOT_MODIFIED 400
45 BROADCAST_CALLS_DISABLED 400
46 BROADCAST_FORBIDDEN 403 The request cannot be used in broadcast channels
47 BROADCAST_ID_INVALID 400 The channel is invalid
141 FILE_REFERENCE_INVALID 400 The file reference is invalid or you can't do that operation on such message
142 FILE_TITLE_EMPTY 400
143 FIRSTNAME_INVALID 400 The first name is invalid
144 FILTER_NOT_SUPPORTED 400
145 FLOOD_TEST_PHONE_WAIT_0 420 A wait of {seconds} seconds is required in the test servers
146 FLOOD_WAIT_0 420 A wait of {seconds} seconds is required
147 FOLDER_ID_EMPTY 400 The folder you tried to delete was already empty
276 PHOTO_THUMB_URL_EMPTY 400 The URL used as a thumbnail appears to be empty or has caused another HTTP error
277 PIN_RESTRICTED 400 You can't pin messages in private chats with other people
278 PINNED_DIALOGS_TOO_MUCH 400
279 POLL_ANSWER_INVALID 400
280 POLL_ANSWERS_INVALID 400 The poll did not have enough answers or had too many
281 POLL_OPTION_DUPLICATE 400 A duplicate option was sent in the same poll
282 POLL_OPTION_INVALID 400 A poll option used invalid data (the data may be too long)
313 RESULT_ID_DUPLICATE 400 Duplicated IDs on the sent results. Make sure to use unique IDs
314 RESULT_ID_INVALID 400 The given result cannot be used to send the selection to the bot
315 RESULT_TYPE_INVALID 400 Result type invalid
316 REVOTE_NOT_ALLOWED 400
317 RIGHT_FORBIDDEN 403 Either your admin rights do not allow you to do this or you passed the wrong rights combination (some rights only apply to channels and vice versa)
318 RPC_CALL_FAIL 500 Telegram is having internal issues, please try again later.
319 RPC_MCGET_FAIL 500 Telegram is having internal issues, please try again later.
323 SCHEDULE_DATE_TOO_LATE 400 The date you tried to schedule is too far in the future (last known limit of 1 year and a few hours)
324 SCHEDULE_STATUS_PRIVATE 400 You cannot schedule a message until the person comes online if their privacy does not show this information
325 SCHEDULE_TOO_MUCH 400 You cannot schedule more messages in this chat (last known limit of 100 per chat)
326 SCORE_INVALID 400
327 SEARCH_QUERY_EMPTY 400 The search query is empty
328 SECONDS_INVALID 400 Slow mode only supports certain values (e.g. 0, 10s, 30s, 1m, 5m, 15m and 1h)
329 SEND_AS_PEER_INVALID
339 SHORTNAME_OCCUPY_FAILED 400 An error occurred when trying to register the short-name used for the sticker pack. Try a different name
340 SHORT_NAME_INVALID 400
341 SHORT_NAME_OCCUPIED 400
342 SLOWMODE_MULTI_MSGS_DISABLED 400
343 SLOWMODE_WAIT_0 420 A wait of {seconds} seconds is required before sending another message in this chat
344 SRP_ID_INVALID 400
345 START_PARAM_EMPTY 400 The start parameter is empty
382 UNTIL_DATE_INVALID 400 That date cannot be specified in this request (try using None)
383 UPDATE_APP_TO_LOGIN 406
384 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)
385 USAGE_LIMIT_INVALID 400
386 USER_VOLUME_INVALID 400
387 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]"
388 USERNAME_NOT_MODIFIED 400 The username is not different from the current username