lb_tantivy/aggregation/
error.rs1use common::ByteCount;
2
3use super::bucket::DateHistogramParseError;
4
5#[derive(Debug, Clone, PartialEq, Eq, Error)]
7pub enum AggregationError {
8 #[error("InternalError: {0:?}")]
10 InternalError(String),
11 #[error("InvalidRequest: {0:?}")]
13 InvalidRequest(String),
14 #[error("Date histogram parse error: {0:?}")]
16 DateHistogramParseError(#[from] DateHistogramParseError),
17 #[error(
19 "Aborting aggregation because memory limit was exceeded. Limit: {limit:?}, Current: \
20 {current:?}"
21 )]
22 MemoryExceeded {
23 limit: ByteCount,
25 current: ByteCount,
27 },
28 #[error(
30 "Aborting aggregation because bucket limit was exceeded. Limit: {limit:?}, Current: \
31 {current:?}"
32 )]
33 BucketLimitExceeded {
34 limit: u32,
36 current: u32,
38 },
39}