Skip to main content

telegram_tool/client/
telegram_error.rs

1use std::time::Duration;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum TelegramError {
6    #[error("TELEGRAM_BOT_TOKEN env var not set")]
7    MissingToken,
8    #[error("Telegram API error: {0}")]
9    Api(String),
10    #[error("Timed out waiting for user reply after {0:?}")]
11    Timeout(Duration),
12    #[error("Telegram update dispatcher is closed")]
13    DispatcherClosed,
14}