TGException enum

Telegram Exceptions Database

Thanks to https://github.com/TelegramBotAPI/errors for the collection of errors.

Inheritance

Values

unauthorized → const TGException

Unauthorized exception

const TGException._(code: 401, description: "Unauthorized", reason: "Bot token is incorrect.", help: "Double check the Bot Token, and pass the correct Bot token to create the …
chatNotFound → const TGException

Chat Not Found

const TGException._(code: 400, description: "Bad Request: chat not found", reason: "Passsed incorrect `chat_id` in.", help: "It is important to note that the Bot cannot initia…
userNotFound → const TGException

User not found

const TGException._(code: 400, description: "Bad Request: user not found", reason: "Incorrect `user_id` is passed with the request", help: "This exception is thrown when you t…
invalidParticipantId → const TGException

Participant ID invalid

const TGException._(code: 400, description: "Bad Request: PARTICIPANT_ID_INVALID", reason: "Invalid `user_id` prameter in the request.", help: "This exception usually occurs w…
deactivatedUser → const TGException

User is deactivated

const TGException._(code: 403, description: "Forbidden: user is deactivated", reason: "You're trying to perform an action on a user account that has been deactivated or deleted"…
botIsKicked → const TGException

Forbidden: bot was kicked from the group chat

const TGException._(code: 403, description: "Forbidden: bot was kicked from the group chat", reason: "Bot was kicked from the group chat", help: "The bot has been kicked from …
blockedByUser → const TGException

Forbidden: bot was blocked by the user

const TGException._(code: 403, description: "Forbidden: bot was blocked by the user", reason: "The user have blocked the bot", help: "You should not deal with this particular …
botToBot → const TGException

Forbidden: bot can't send messages to bots

const TGException._(code: 403, description: "Forbidden: bot can't send messages to bots", reason: "You tried to send a message to another bot. This is not possible", help: &quo…
tooManyRequest → const TGException

Too Many Requests: retry after X

const TGException._(code: 429, description: r"Too Many Requests: retry after \d+", reason: "You are hitting the API limit.", help: "All of the API endpoinds have its own rate …
migratedToSupergroup → const TGException

Bad Request: group chat was migrated to a supergroup chat

const TGException._(code: 400, description: "Bad Request: group chat was migrated to a supergroup chat", reason: "Occurs when a group chat has been converted/migrated to a supergrou…
invalidFileId → const TGException

Bad Request: invalid file id

const TGException._(code: 400, description: "Bad Request: invalid file id", reason: "The file id you are trying to retrieve doesn't exist.", help: "Make sure that you'…
messageIsNotModified → const TGException

Bad Request: message is not modified

const TGException._(code: 400, description: "Bad Request: message is not modified", reason: "The current and new message text and reply markups are the same.", help: "Either c…
terminated → const TGException

Conflict: terminated by other long poll or webhook

const TGException._(code: 409, description: "Conflict: terminated by other long poll or webhook", reason: "You have already set up a webhook and are trying to get the updates via `getUp…
messageTextisEmpty → const TGException

Bad Request: message text is empty

const TGException._(code: 400, description: "Bad Request: message text is empty", reason: "The message text is empty or not provided", help: "This exception is possibly occure…
invalidChatAction → const TGException

Bad Request: wrong parameter action in request

const TGException._(code: 400, description: "Bad Request: wrong parameter action in request", reason: "Occurs when the action property value is invalid ", help: "Provide a val…
topicClosed → const TGException

Bad Request: TOPIC_CLOSED

const TGException._(code: 400, description: "Bad Request: TOPIC_CLOSED", reason: "The forum topic has been closed. Sending messages to this TOPIC is not allowed.", help: "Eith…
threadNotFound → const TGException

Bad Request: message thread not found

const TGException._(code: 400, description: "Bad Request: message thread not found", reason: "This occurs when bot is trying to send message to a non-existing thread.", help: "…
webhookActiveCantLongPoll → const TGException

Conflict: can't use getUpdates method while webhook is active; use deleteWebhook to delete the webhook first

const TGException._(code: 409, description: "Conflict: can't use getUpdates method while webhook is active; use deleteWebhook to delete the webhook first", reason: "You are trying t…
queryIsTooOldOrExpired → const TGException

Bad Request: query is too old and response timeout expired or query ID is invalid

const TGException._(code: 400, description: "Bad Request: query is too old and response timeout expired or query ID is invalid", reason: "This exception occurs when you invoke the answe…

Properties

code int
Status code for this kind of exception.
final
description String
Description of the exception
final
hashCode int
The hash code for this object.
no setterinherited
help String
Possible solution to fix this kind of exception.
final
index int
A numeric identifier for the enumerated value.
no setterinherited
reason String
Human readable description or reason behind the exception
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

find(String description) TGException?
Finds a TGException that matches the description.

Constants

values → const List<TGException>
A constant List of the values in this enum, in order of their declaration.