Skip to content

Commit

Permalink
Add 2 unknown_errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SpEcHiDe committed Mar 9, 2025
1 parent a2f79e0 commit f33d96d
Show file tree
Hide file tree
Showing 9 changed files with 419 additions and 415 deletions.
1 change: 1 addition & 0 deletions compiler/docs/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ def get_title_list(s: str) -> list:
retract_vote
translate_text
translate_message_text
delete_chat_history
""",
chats="""
Chats
Expand Down
15 changes: 8 additions & 7 deletions compiler/errors/sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@
for h in e:
dct = {}

for p in Path("source/").glob(f"{h}*.tsv"):
with open(p) as f:
reader = csv.reader(f, delimiter="\t")
for k, v in reader:
if k != "id":
dct[k] = v

j = d.get("errors").get(h)
for k in j:
if k.endswith("_*"):
Expand All @@ -68,16 +75,10 @@
l = l.replace("\"", "'")
l = l.replace("»", "»")
l = l.replace("«", "«")
l = l.replace(" »", "")
l = l.replace("](/api/", f"]({b}/api/")
dct[m] = l

for p in Path("source/").glob(f"{h}*.tsv"):
with open(p) as f:
reader = csv.reader(f, delimiter="\t")
for k, v in reader:
if k != "id":
dct[k] = v

keys = sorted(dct)

for p in Path("source/").glob(f"{h}*.tsv"):
Expand Down
8 changes: 4 additions & 4 deletions compiler/errors/source/303_SEE_OTHER.tsv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id message
FILE_MIGRATE_X The file to be accessed is currently stored in DC{value}
NETWORK_MIGRATE_X The source IP address is associated with DC{value} (for registration)
PHONE_MIGRATE_X The phone number a user is trying to use for authorization is associated with DC{value}
STATS_MIGRATE_X The statistics of the group/channel are stored in DC{value}
USER_MIGRATE_X The user whose identity is being used to execute queries is associated with DC{value} (for registration)
NETWORK_MIGRATE_X Your IP address is associated to DC {value}, please re-send the query to that DC.
PHONE_MIGRATE_X Your phone number is associated to DC {value}, please re-send the query to that DC.
STATS_MIGRATE_X Channel statistics for the specified channel are stored on DC {value}, please re-send the query to that DC.
USER_MIGRATE_X Your account is associated to DC {value}, please re-send the query to that DC.
698 changes: 349 additions & 349 deletions compiler/errors/source/400_BAD_REQUEST.tsv

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions compiler/errors/source/401_UNAUTHORIZED.tsv
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
id message
ACTIVE_USER_REQUIRED The method is only available to already activated users
AUTH_KEY_INVALID The key is invalid
AUTH_KEY_PERM_EMPTY The method is unavailable for temporary authorization key, not bound to permanent
AUTH_KEY_UNREGISTERED The key is not registered in the system. Delete your session file and login again
SESSION_EXPIRED The authorization has expired
SESSION_PASSWORD_NEEDED The two-step verification is enabled and a password is required
SESSION_REVOKED The authorization has been invalidated, because of the user terminating all sessions
USER_DEACTIVATED The user has been deleted/deactivated
USER_DEACTIVATED_BAN The user has been deleted/deactivated
AUTH_KEY_INVALID The specified auth key is invalid.
AUTH_KEY_PERM_EMPTY The method is unavailable for temporary authorization keys, not bound to a permanent authorization key.
AUTH_KEY_UNREGISTERED The specified authorization key is not registered in the system (for example, a PFS temporary key has expired).
SESSION_EXPIRED The session has expired.
SESSION_PASSWORD_NEEDED 2FA is enabled, use a password to login.
SESSION_REVOKED The session was revoked by the user.
USER_DEACTIVATED The current account was deleted by the user.
USER_DEACTIVATED_BAN The current account was deleted and banned by Telegram's antispam system.
58 changes: 30 additions & 28 deletions compiler/errors/source/403_FORBIDDEN.tsv
Original file line number Diff line number Diff line change
@@ -1,52 +1,54 @@
id message
ALLOW_PAYMENT_REQUIRED_X The user has enabled paid messages with {value} stars.
ANONYMOUS_REACTIONS_DISABLED Sorry, anonymous administrators cannot leave reactions or participate in polls.
BOT_OWNER_REQUIRED You must be the owner of the bot to perform this action
BROADCAST_FORBIDDEN The request can't be used in channels
CHANNEL_PUBLIC_GROUP_NA The channel/supergroup is not available
BROADCAST_FORBIDDEN Channel poll voters and reactions cannot be fetched to prevent deanonymization.
CHANNEL_PUBLIC_GROUP_NA channel/supergroup not available.
CHAT_ACTION_FORBIDDEN You cannot execute this action.
CHAT_ADMIN_INVITE_REQUIRED You don't have rights to invite other users
CHAT_ADMIN_REQUIRED The method requires chat admin privileges
CHAT_FORBIDDEN You cannot write in this chat
CHAT_GUEST_SEND_FORBIDDEN You join the discussion group before commenting, see [here »](https://core.telegram.org/api/discussion#requiring-users-to-join-the-group) for more info.
CHAT_ADMIN_INVITE_REQUIRED You do not have the rights to do this.
CHAT_ADMIN_REQUIRED You must be an admin in this chat to do this.
CHAT_FORBIDDEN This chat is not available to the current user.
CHAT_GUEST_SEND_FORBIDDEN You join the discussion group before commenting, see [here](https://core.telegram.org/api/discussion#requiring-users-to-join-the-group) for more info.
CHAT_SEND_AUDIOS_FORBIDDEN You can't send audio messages in this chat.
CHAT_SEND_DOCS_FORBIDDEN You can't send documents in this chat.
CHAT_SEND_GAME_FORBIDDEN You can't send a game to this chat.
CHAT_SEND_GIFS_FORBIDDEN You can't send animations in this chat
CHAT_SEND_INLINE_FORBIDDEN You cannot use inline bots to send messages in this chat
CHAT_SEND_MEDIA_FORBIDDEN You can't send media messages in this chat
CHAT_SEND_GIFS_FORBIDDEN You can't send gifs in this chat.
CHAT_SEND_INLINE_FORBIDDEN You can't send inline messages in this group.
CHAT_SEND_MEDIA_FORBIDDEN You can't send media in this chat.
CHAT_SEND_PHOTOS_FORBIDDEN You can't send photos in this chat.
CHAT_SEND_PLAIN_FORBIDDEN You can't send non-media (text) messages in this chat.
CHAT_SEND_POLL_FORBIDDEN You can't send polls in this chat
CHAT_SEND_POLL_FORBIDDEN You can't send polls in this chat.
CHAT_SEND_ROUNDVIDEOS_FORBIDDEN You can't send round videos to this chat.
CHAT_SEND_STICKERS_FORBIDDEN You can't send stickers in this chat
CHAT_SEND_STICKERS_FORBIDDEN You can't send stickers in this chat.
CHAT_SEND_VIDEOS_FORBIDDEN You can't send videos in this chat.
CHAT_SEND_VOICES_FORBIDDEN You can't send voice recordings in this chat.
CHAT_TYPE_INVALID The specified user type is invalid.
CHAT_WRITE_FORBIDDEN You don't have rights to send messages in this chat
EDIT_BOT_INVITE_FORBIDDEN Bots' chat invite links can't be edited
CHAT_WRITE_FORBIDDEN You can't write in this chat.
EDIT_BOT_INVITE_FORBIDDEN Normal users can't edit invites that were created by bots.
GROUPCALL_ALREADY_STARTED The groupcall has already started, you can join directly using [phone.joinGroupCall](https://core.telegram.org/method/phone.joinGroupCall).
GROUPCALL_FORBIDDEN The group call has already ended.
INLINE_BOT_REQUIRED The action must be performed through an inline bot callback
MESSAGE_AUTHOR_REQUIRED You are not the author of this message
MESSAGE_DELETE_FORBIDDEN You don't have rights to delete messages in this chat, most likely because you are not the author of them
INLINE_BOT_REQUIRED Only the inline bot can edit message.
MESSAGE_AUTHOR_REQUIRED Message author required.
MESSAGE_DELETE_FORBIDDEN You can't delete one of the messages you tried to delete, most likely because it is a service message.
NOT_ELIGIBLE The current user is not eligible to join the Peer-to-Peer Login Program.
PARTICIPANT_JOIN_MISSING Trying to enable a presentation, when the user hasn't joined the Video Chat with [phone.joinGroupCall](https://core.telegram.org/method/phone.joinGroupCall).
PEER_ID_INVALID The provided peer id is invalid.
POLL_VOTE_REQUIRED Cast a vote in the poll before calling this method
PREMIUM_ACCOUNT_REQUIRED This action requires a premium account
POLL_VOTE_REQUIRED Cast a vote in the poll before calling this method.
PREMIUM_ACCOUNT_REQUIRED A premium account is required to execute this action.
PRIVACY_PREMIUM_REQUIRED You need a [Telegram Premium subscription](https://core.telegram.org/api/premium) to send a message to this user.
PUBLIC_CHANNEL_MISSING You can only export group call invite links for public chats or channels.
RIGHT_FORBIDDEN You don't have enough rights for this action, or you tried to set one or more admin rights that can't be applied to this kind of chat (channel or supergroup)
SENSITIVE_CHANGE_FORBIDDEN Your sensitive content settings can't be changed at this time
TAKEOUT_REQUIRED The method must be invoked inside a takeout session
USER_BOT_INVALID This method can only be called by a bot
USER_CHANNELS_TOO_MUCH One of the users you tried to add is already in too many channels/supergroups
RECAPTCHA_CHECK_X The request can't be completed unless reCAPTCHA verification {value} is performed; for official mobile applications only
RIGHT_FORBIDDEN Your admin rights do not allow you to do this.
SENSITIVE_CHANGE_FORBIDDEN You can't change your sensitive content settings.
TAKEOUT_REQUIRED A [takeout](https://core.telegram.org/api/takeout) session needs to be initialized first, [see here for more info](https://core.telegram.org/api/takeout).
USER_BOT_INVALID User accounts must provide the `bot` method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts.
USER_CHANNELS_TOO_MUCH One of the users you tried to add is already in too many channels/supergroups.
USER_DELETED You can't send this secret message because the other participant deleted their account.
USER_INVALID The provided user is invalid
USER_IS_BLOCKED The user is blocked
USER_NOT_MUTUAL_CONTACT The provided user is not a mutual contact
USER_INVALID Invalid user provided.
USER_IS_BLOCKED You were blocked by this user.
USER_NOT_MUTUAL_CONTACT The provided user is not a mutual contact.
USER_NOT_PARTICIPANT You're not a member of this supergroup/channel.
USER_PRIVACY_RESTRICTED The user's privacy settings is preventing you to perform this action
USER_RESTRICTED You are limited/restricted. You can't perform this action
USER_PRIVACY_RESTRICTED The user's privacy settings do not allow you to do this.
USER_RESTRICTED You're spamreported, you can't create channels or chats.
VOICE_MESSAGES_FORBIDDEN This user's privacy settings forbid you from sending voice messages.
YOUR_PRIVACY_RESTRICTED You cannot fetch the read date of this message because you have disallowed other users to do so for *your* messages; to fix, allow other users to see *your* exact last online date OR purchase a [Telegram Premium](https://core.telegram.org/api/premium) subscription.
24 changes: 12 additions & 12 deletions compiler/errors/source/406_NOT_ACCEPTABLE.tsv
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
id message
AUTH_KEY_DUPLICATED The same authorization key (session file) was used in more than one place simultaneously. You must delete your session file and log in again with your phone number or bot token
AUTH_KEY_DUPLICATED Concurrent usage of the current session from multiple connections was detected, the current session was invalidated by the server for security reasons!
BANNED_RIGHTS_INVALID You provided some invalid flags in the banned rights.
BOT_PRECHECKOUT_FAILED Bot precheckout failed.
BUSINESS_ADDRESS_ACTIVE The user is currently advertising a [Business Location](https://core.telegram.org/api/business#location), the location may only be changed (or removed) using [account.updateBusinessLocation »](https://core.telegram.org/method/account.updateBusinessLocation). .
BUSINESS_ADDRESS_ACTIVE The user is currently advertising a [Business Location](https://core.telegram.org/api/business#location), the location may only be changed (or removed) using [account.updateBusinessLocation](https://core.telegram.org/method/account.updateBusinessLocation). .
CALL_PROTOCOL_COMPAT_LAYER_INVALID The other side of the call does not support any of the VoIP protocols supported by the local client, as specified by the `protocol.layer` and `protocol.library_versions` fields.
CHANNEL_PRIVATE You haven't joined this channel/supergroup.
CHANNEL_TOO_LARGE Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change).
CHAT_FORWARDS_RESTRICTED You can't forward messages from a protected chat.
FILEREF_UPGRADE_NEEDED The file reference has expired and you must use a refreshed one by obtaining the original media message. The client has to be updated in order to support [file references](https://core.telegram.org/api/file_reference).
FRESH_CHANGE_ADMINS_FORBIDDEN You were just elected admin, you can't add or modify other admins yet
FRESH_CHANGE_PHONE_FORBIDDEN You can't change your phone number because your session was logged-in recently
FRESH_RESET_AUTHORISATION_FORBIDDEN You can't terminate other authorized sessions because the current was logged-in recently
FILEREF_UPGRADE_NEEDED The client has to be updated in order to support [file references](https://core.telegram.org/api/file_reference).
FRESH_CHANGE_ADMINS_FORBIDDEN You were just elected admin, you can't add or modify other admins yet.
FRESH_CHANGE_PHONE_FORBIDDEN You can't change phone number right after logging in, please wait at least 24 hours.
FRESH_RESET_AUTHORISATION_FORBIDDEN You can't logout other sessions if less than 24 hours have passed since you logged on the current session.
INVITE_HASH_EXPIRED The invite link has expired.
PAYMENT_UNSUPPORTED A detailed description of the error will be received separately as described [here](https://core.telegram.org/api/errors#406-not-acceptable).
PHONE_NUMBER_INVALID The phone number is invalid
PHONE_PASSWORD_FLOOD You have tried logging in too many times
PHONE_NUMBER_INVALID The phone number is invalid.
PHONE_PASSWORD_FLOOD You have tried logging in too many times.
PREMIUM_CURRENTLY_UNAVAILABLE You cannot currently purchase a Premium subscription.
PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN Import for this chat is already in progress, wait {value} minutes before starting a new one.
PRIVACY_PREMIUM_REQUIRED You need a [Telegram Premium subscription](https://core.telegram.org/api/premium) to send a message to this user.
SEND_CODE_UNAVAILABLE Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend).
STICKERSET_INVALID The provided sticker set is invalid.
STICKERSET_OWNER_ANONYMOUS This sticker set can't be used as the group's sticker set to prevent admin deanonymization.
STICKERSET_OWNER_ANONYMOUS Provided stickerset can't be installed as group stickerset to prevent admin deanonymization.
TOPIC_CLOSED This topic was closed, you can't send messages to it anymore.
TOPIC_DELETED The specified topic was deleted.
UPDATE_APP_TO_LOGIN Please update to the latest version of MadelineProto to login.
UPDATE_APP_TO_LOGIN Please update your client to login.
USERPIC_PRIVACY_REQUIRED You need to disable privacy settings for your profile picture in order to make your geolocation public.
USERPIC_UPLOAD_REQUIRED You must have a profile picture to publish your geolocation
USER_RESTRICTED You are limited/restricted. You can't perform this action
USERPIC_UPLOAD_REQUIRED You must have a profile picture to publish your geolocation.
USER_RESTRICTED You're spamreported, you can't create channels or chats.
2 changes: 1 addition & 1 deletion compiler/errors/source/420_FLOOD.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id message
ADDRESS_INVALID The specified geopoint address is invalid.
FLOOD_PREMIUM_WAIT_X Please wait {value} seconds before repeating the action, or purchase a [Telegram Premium subscription](https://core.telegram.org/api/premium) to remove this rate limit.
FLOOD_TEST_PHONE_WAIT_X A wait of {value} seconds is required in the test servers
FLOOD_WAIT_X A wait of {value} seconds is required
FLOOD_WAIT_X Please wait {value} seconds before repeating the action.
PREMIUM_SUB_ACTIVE_UNTIL_X You already have a premium subscription active until unixtime {value} .
SLOWMODE_WAIT_X Slowmode is enabled in this chat: wait {value} seconds before sending another message to this chat.
STORY_SEND_FLOOD_X A wait of {value} seconds is required to continue posting stories
Expand Down
12 changes: 6 additions & 6 deletions compiler/errors/source/500_INTERNAL_SERVER_ERROR.tsv
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
id message
API_CALL_ERROR API call error due to Telegram having internal problems. Please try again later
AUTH_KEY_UNSYNCHRONIZED Internal error, please repeat the method call.
AUTH_RESTART User authorization must be restarted
AUTH_RESTART Restart the authorization process.
AUTH_RESTART_X Internal error (debug info {value}), please repeat the method call.
CALL_OCCUPY_FAILED The call failed because the user is already making another call
CALL_OCCUPY_FAILED The call failed because the user is already making another call.
CDN_UPLOAD_TIMEOUT A server-side timeout occurred while reuploading the file to the CDN DC.
CHAT_ID_GENERATE_FAILED Failure while generating the chat ID due to Telegram having internal problems. Please try again later
CHAT_ID_GENERATE_FAILED Failure while generating the chat ID.
CHAT_INVALID Invalid chat.
CHAT_OCCUPY_LOC_FAILED An internal error occurred while creating the chat
CHAT_OCCUPY_USERNAME_FAILED Failure to occupy chat username due to Telegram having internal problems. Please try again later
Expand All @@ -31,18 +31,18 @@ NEED_CHAT_INVALID The provided chat is invalid
NEED_MEMBER_INVALID The provided member is invalid or does not exist
No workers running The Telegram server is restarting its workers. Try again later.
PARTICIPANT_CALL_FAILED Failure while making call due to Telegram having internal problems. Please try again later
PERSISTENT_TIMESTAMP_OUTDATED Channel internal replication issues, try again later (treat this like an ``RPC_CALL_FAIL``)
PERSISTENT_TIMESTAMP_OUTDATED Channel internal replication issues, try again later (treat this like an RPC_CALL_FAIL).
PHOTO_CREATE_FAILED The creation of the photo failed due to Telegram having internal problems. Please try again later
POSTPONED_TIMEOUT Telegram is having internal problems. Please try again later
PTS_CHANGE_EMPTY No PTS change
RANDOM_ID_DUPLICATE You provided a random ID that was already used
RANDOM_ID_DUPLICATE You provided a random ID that was already used.
REG_ID_GENERATE_FAILED The registration id failed to generate due to Telegram having internal problems. Please try again later
RPC_CALL_FAIL Telegram is having internal problems. Please try again later
RPC_CONNECT_FAILED Telegram is having internal problems. Please try again later
RPC_MCGET_FAIL Telegram is having internal problems. Please try again later
RPC_SEND_FAIL Telegram is having internal problems. Please try again later
SEND_MEDIA_INVALID The specified media is invalid.
SIGN_IN_FAILED Failure while signing in due to Telegram having internal problems. Please try again later
SIGN_IN_FAILED Failure while signing in.
STORAGE_CHECK_FAILED Server storage check failed due to Telegram having internal problems. Please try again later
STORAGE_CHOOSE_VOLUME_FAILED Storage choose volume failed due to Telegram having internal problems. Please try again later
STORE_INVALID_SCALAR_TYPE Telegram is having internal problems. Please try again later
Expand Down

0 comments on commit f33d96d

Please sign in to comment.