use thiserror::Error;
use crate::resp::RespError;
pub type WalleResult<T> = Result<T, WalleError>;
#[derive(Error, Debug)]
pub enum WalleError {
#[error("Action send error")]
ActionSendError,
#[error("Action Response Timeout")]
ResponseTimeout,
#[error("{0}")]
IO(#[from] std::io::Error),
#[error("OneBot is already running")]
AlreadyRunning,
#[error("ExtendedMap missed key: {0}")]
MapMissedKey(String),
#[error("ExtendedMap value type mismatch: expect {0}, got {1}")]
MapValueTypeMismatch(String, String),
#[error("RespMissmatch")]
RespMissmatch, #[error("{0:?}")]
RespError(RespError),
}