deribit_websocket/error/
mod.rs1#[derive(Debug, thiserror::Error)]
5pub enum WebSocketError {
6 #[error("Connection failed: {0}")]
7 ConnectionFailed(String),
9
10 #[error("Authentication failed: {0}")]
11 AuthenticationFailed(String),
13
14 #[error("Subscription failed: {0}")]
15 SubscriptionFailed(String),
17
18 #[error("Invalid message format: {0}")]
19 InvalidMessage(String),
21
22 #[error("Connection closed unexpectedly")]
23 ConnectionClosed,
25
26 #[error("Heartbeat timeout")]
27 HeartbeatTimeout,
29
30 #[error("API error {0}: {1}")]
31 ApiError(i32, String),
33}