use thiserror::Error;
#[derive(Debug, Error)]
pub enum PolymarketError {
#[error("WebSocket error: {0}")]
WebSocket(#[from] ws_reconnect_client::WebSocketError),
#[error("HTTP request failed: {0}")]
HttpRequest(#[from] reqwest::Error),
#[error("JSON serialization/deserialization error: {0}")]
Json(#[from] serde_json::Error),
#[error("API error: {0}")]
Api(String),
#[error("Invalid configuration: {0}")]
InvalidConfig(String),
}
pub type Result<T> = std::result::Result<T, PolymarketError>;