guts_realtime/
error.rs

1//! Error types for the real-time module.
2
3use thiserror::Error;
4
5/// Errors that can occur in real-time operations.
6#[derive(Debug, Error)]
7pub enum RealtimeError {
8    /// Invalid channel format.
9    #[error("invalid channel: {0}")]
10    InvalidChannel(String),
11
12    /// Subscription limit exceeded.
13    #[error("subscription limit exceeded: max {0} subscriptions")]
14    SubscriptionLimit(usize),
15
16    /// Client not found.
17    #[error("client not found: {0}")]
18    ClientNotFound(String),
19
20    /// Send failed.
21    #[error("failed to send message: {0}")]
22    SendFailed(String),
23
24    /// Serialization error.
25    #[error("serialization error: {0}")]
26    Serialization(#[from] serde_json::Error),
27
28    /// Channel closed.
29    #[error("channel closed")]
30    ChannelClosed,
31}