d7329d9
zhenyi
feat(chat): harden chat crate (message size limits, content-type allow-list, body sanitization, bounded channels, webhook dedup)
d7329d9
#[derive(Debug, thiserror::Error)]
pub enum QueueError {
#[error("kafka error: {0}")]
Kafka(#[from] rdkafka::error::KafkaError),
#[error("serialization error: {0}")]
Serde(#[from] serde_json::Error),
#[error("subscribe handler error: {0}")]
Handler(String),
#[error("queue is disabled")]
Disabled,
#[error("config invalid: {0}")]
Config(String),
#[error("topic name invalid: {0}")]
Topic(String),
#[error("subscribe join error: {0}")]
Join(#[from] tokio::task::JoinError),
#[error("subscribe cancelled")]
Cancelled,
}