cognee_core/error.rs
1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum CoreError {
5 #[error("Runtime error: {0}")]
6 Runtime(String),
7
8 #[error("Thread pool build error: {0}")]
9 ThreadPoolBuild(String),
10
11 /// Returned when waiting for a spawned CPU task and its sender was dropped
12 /// (e.g. the task panicked or the pool was shut down).
13 #[error("CPU task aborted: {reason}")]
14 TaskAborted { reason: String },
15
16 #[error("Required TaskContext field is missing: {field}")]
17 MissingContextField { field: &'static str },
18
19 #[error("invalid progress split: {reason}")]
20 InvalidProgressSplit { reason: String },
21}