1use thiserror::Error;
4
5#[derive(Debug, Error)]
7pub enum RealtimeError {
8 #[error("invalid channel: {0}")]
10 InvalidChannel(String),
11
12 #[error("subscription limit exceeded: max {0} subscriptions")]
14 SubscriptionLimit(usize),
15
16 #[error("client not found: {0}")]
18 ClientNotFound(String),
19
20 #[error("failed to send message: {0}")]
22 SendFailed(String),
23
24 #[error("serialization error: {0}")]
26 Serialization(#[from] serde_json::Error),
27
28 #[error("channel closed")]
30 ChannelClosed,
31}