use thiserror::Error;
#[derive(Error, Debug)]
pub enum MessageBoxError {
#[error("wallet error: {0}")]
Wallet(String),
#[error("auth error: {0}")]
Auth(String),
#[error("HTTP error: status {0} from {1}")]
Http(u16, String),
#[error("encryption error: {0}")]
Encryption(String),
#[error("JSON parse error: {0}")]
Json(#[from] serde_json::Error),
#[error("missing header: {0}")]
MissingHeader(String),
#[error("not initialized")]
NotInitialized,
#[error("websocket error: {0}")]
WebSocket(String),
#[error("overlay error: {0}")]
Overlay(String),
#[error("validation error: {0}")]
Validation(String),
}