Creates an instance of TelegramError.
The error code from the enum ErrorCodes.
Optional
params: Record<string, any>An object containing values to replace placeholders in the error message.
Optional
stackStatic
Optional
prepareOptional override for formatting stack traces
Static
stack
Represents a generic error from the Telegram API. This error class extends the standard
Error
object and includes additional properties for error code and description.