Skip to content

Commit 7b3b29c

Browse files
committed
✨ feat(compiler/errors): Update error source files and add new error codes for Telegram Stars and gifts.
1 parent 55e94b0 commit 7b3b29c

6 files changed

Lines changed: 99 additions & 41 deletions

File tree

compiler/errors/source/400_BAD_REQUEST.tsv

Lines changed: 81 additions & 29 deletions
Large diffs are not rendered by default.

compiler/errors/source/403_FORBIDDEN.tsv

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
id message
2+
ACCESS_DENIED
23
ALLOW_PAYMENT_REQUIRED_X This peer charges {value} [Telegram Stars](https://core.telegram.org/api/stars) per message, but the `allow_paid_stars` was not set or its value is smaller than {value}.
34
ANONYMOUS_REACTIONS_DISABLED Sorry, anonymous administrators cannot leave reactions or participate in polls.
4-
BOT_ACCESS_FORBIDDEN
5+
BOT_ACCESS_FORBIDDEN The specified method *can* be used over a [business connection](https://core.telegram.org/api/bots/connected-business-bots) for some operations, but the specified query attempted an operation that is not allowed over a business connection.
6+
BOT_VERIFIER_FORBIDDEN This bot cannot assign [verification icons](https://core.telegram.org/api/bots/verification).
57
BROADCAST_FORBIDDEN Channel poll voters and reactions cannot be fetched to prevent deanonymization.
68
CHANNEL_PUBLIC_GROUP_NA channel/supergroup not available.
79
CHAT_ACTION_FORBIDDEN You cannot execute this action.
@@ -41,13 +43,13 @@ PUBLIC_CHANNEL_MISSING You can only export group call invite links for public ch
4143
RIGHT_FORBIDDEN Your admin rights do not allow you to do this.
4244
SENSITIVE_CHANGE_FORBIDDEN You can't change your sensitive content settings.
4345
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).
44-
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.
4546
USER_CHANNELS_TOO_MUCH One of the users you tried to add is already in too many channels/supergroups.
4647
USER_DELETED You can't send this secret message because the other participant deleted their account.
4748
USER_INVALID Invalid user provided.
4849
USER_IS_BLOCKED You were blocked by this user.
4950
USER_NOT_MUTUAL_CONTACT The provided user is not a mutual contact.
5051
USER_NOT_PARTICIPANT You're not a member of this supergroup/channel.
52+
USER_PERMISSION_DENIED The user hasn't granted or has revoked the bot's access to change their emoji status using [bots.toggleUserEmojiStatusPermission](https://core.telegram.org/method/bots.toggleUserEmojiStatusPermission).
5153
USER_PRIVACY_RESTRICTED The user's privacy settings do not allow you to do this.
5254
USER_RESTRICTED You're spamreported, you can't create channels or chats.
5355
VOICE_MESSAGES_FORBIDDEN This user's privacy settings forbid you from sending voice messages.

compiler/errors/source/406_NOT_ACCEPTABLE.tsv

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
id message
2-
ALLOW_PAYMENT_REQUIRED
2+
ALLOW_PAYMENT_REQUIRED This peer only accepts [paid messages »](https://core.telegram.org/api/paid-messages): this error is only emitted for older layers without paid messages support, so the client must be updated in order to use paid messages. .
3+
API_GIFT_RESTRICTED_UPDATE_APP Please update the app to access the gift API.
34
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!
45
BANNED_RIGHTS_INVALID You provided some invalid flags in the banned rights.
56
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). .
67
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.
78
CHANNEL_PRIVATE You haven't joined this channel/supergroup.
89
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).
910
CHAT_FORWARDS_RESTRICTED You can't forward messages from a protected chat.
10-
FILEREF_UPGRADE_NEEDED The client has to be updated in order to support [file references](https://core.telegram.org/api/file_reference).
11+
FILEREF_UPGRADE_NEEDED The client has to be updated in order to support [file references](https://core.telegram.org/api/file-references).
1112
FRESH_CHANGE_ADMINS_FORBIDDEN You were just elected admin, you can't add or modify other admins yet.
1213
FRESH_CHANGE_PHONE_FORBIDDEN You can't change phone number right after logging in, please wait at least 24 hours.
1314
FRESH_RESET_AUTHORISATION_FORBIDDEN You can't logout other sessions if less than 24 hours have passed since you logged on the current session.
@@ -16,17 +17,18 @@ PAYMENT_UNSUPPORTED A detailed description of the error will be received separat
1617
PEER_ID_INVALID The provided peer id is invalid.
1718
PHONE_NUMBER_INVALID The phone number is invalid.
1819
PHONE_PASSWORD_FLOOD You have tried logging in too many times.
19-
PRECHECKOUT_FAILED
20+
PRECHECKOUT_FAILED Precheckout failed, a detailed and localized description for the error will be emitted via an [updateServiceNotification as specified here »](https://core.telegram.org/api/errors#406-not-acceptable).
2021
PREMIUM_CURRENTLY_UNAVAILABLE You cannot currently purchase a Premium subscription.
2122
PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN Import for this chat is already in progress, wait {value} minutes before starting a new one.
2223
PRIVACY_PREMIUM_REQUIRED You need a [Telegram Premium subscription](https://core.telegram.org/api/premium) to send a message to this user.
2324
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).
24-
STARS_FORM_AMOUNT_MISMATCH
25+
STARGIFT_EXPORT_IN_PROGRESS A gift export is in progress, a detailed and localized description for the error will be emitted via an [updateServiceNotification as specified here »](https://core.telegram.org/api/errors#406-not-acceptable).
26+
STARS_FORM_AMOUNT_MISMATCH The form amount has changed, please fetch the new form using [payments.getPaymentForm](https://core.telegram.org/method/payments.getPaymentForm) and restart the process.
2527
STICKERSET_INVALID The provided sticker set is invalid.
2628
STICKERSET_OWNER_ANONYMOUS Provided stickerset can't be installed as group stickerset to prevent admin deanonymization.
2729
TOPIC_CLOSED This topic was closed, you can't send messages to it anymore.
2830
TOPIC_DELETED The specified topic was deleted.
29-
TRANSLATIONS_DISABLED
31+
TRANSLATIONS_DISABLED Translations are unavailable, a detailed and localized description for the error will be emitted via an [updateServiceNotification as specified here »](https://core.telegram.org/api/errors#406-not-acceptable).
3032
UPDATE_APP_TO_LOGIN Please update your client to login.
3133
USERPIC_PRIVACY_REQUIRED You need to disable privacy settings for your profile picture in order to make your geolocation public.
3234
USERPIC_UPLOAD_REQUIRED You must have a profile picture to publish your geolocation.

compiler/errors/source/420_FLOOD.tsv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id message
33
ADDRESS_INVALID The specified geopoint address is invalid.
44
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.
55
FLOOD_WAIT_X Please wait {value} seconds before repeating the action.
6-
FROZEN_METHOD_INVALID
6+
FROZEN_METHOD_INVALID The current account is [frozen](https://core.telegram.org/api/auth#frozen-accounts), and thus cannot execute the specified action.
77
PREMIUM_SUB_ACTIVE_UNTIL_X You already have a premium subscription active until unixtime {value} .
88
SLOWMODE_WAIT_X Slowmode is enabled in this chat: wait {value} seconds before sending another message to this chat.
99
TAKEOUT_INIT_DELAY_X Sorry, for security reasons, you will be able to begin downloading your data in {value} seconds. We have notified all your devices about the export request to make sure it's authorized and to give you time to react if it's not.

compiler/errors/source/500_INTERNAL_SERVER_ERROR.tsv

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ CALL_OCCUPY_FAILED The call failed because the user is already making another ca
66
CDN_UPLOAD_TIMEOUT A server-side timeout occurred while reuploading the file to the CDN DC.
77
CHAT_ID_GENERATE_FAILED Failure while generating the chat ID.
88
CHAT_INVALID Invalid chat.
9-
FIRSTNAME_INVALID The first name is invalid.
9+
ENCRYPTION_DECLINE_ADMIN_FAILED
10+
GROUPCALL_ADD_PARTICIPANTS_FAILED
1011
MSG_WAIT_FAILED A waiting call returned an error.
12+
NEED_DOC_INVALID
1113
PARTICIPANT_CALL_FAILED
14+
PASSKEY_AUTH_RESTART
1215
PERSISTENT_TIMESTAMP_OUTDATED Channel internal replication issues, try again later (treat this like an RPC_CALL_FAIL).
1316
RANDOM_ID_DUPLICATE You provided a random ID that was already used.
1417
SEND_MEDIA_INVALID The specified media is invalid.
1518
SIGN_IN_FAILED Failure while signing in.
1619
TRANSLATE_REQ_FAILED Translation failed, please try again later.
17-
TRANSLATION_TIMEOUT
20+
TRANSLATION_TIMEOUT A timeout occurred while translating the specified text.
21+
VOLUME_MOVE_INVALID

compiler/errors/source/504_UNKNOWN.tsv

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)