Skip to main content

clicktype_batch/
error.rs

1use thiserror::Error;
2
3/// Errors that can occur during batching operations
4#[derive(Error, Debug)]
5pub enum BatchError {
6    #[error("Channel closed: the batcher worker has terminated")]
7    ChannelClosed,
8
9    #[error("Channel full: the batcher is under heavy load")]
10    ChannelFull,
11
12    #[error("Flush failed: {0}")]
13    FlushError(String),
14
15    #[error("Serialization error: {0}")]
16    SerializationError(String),
17
18    #[error("Schema validation failed: {0}")]
19    SchemaError(String),
20}
21
22pub type Result<T> = std::result::Result<T, BatchError>;