Skip to main content

botkit_core/
error.rs

1use thiserror::Error;
2
3/// Main error type for bot operations
4#[derive(Debug, Error)]
5pub enum BotError {
6    #[error("connection failed: {0}")]
7    Connection(String),
8
9    #[error("authentication failed: {0}")]
10    Auth(String),
11
12    #[error("API request failed: {0}")]
13    Api(String),
14
15    #[error("serialization error: {0}")]
16    Serialization(#[from] serde_json::Error),
17
18    #[error("handler error: {0}")]
19    Handler(String),
20
21    #[error("shutdown requested")]
22    Shutdown,
23
24    #[error("{0}")]
25    Other(String),
26}