1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum UcmError {
5 #[error("Entity not found: {0}")]
6 EntityNotFound(String),
7
8 #[error("Edge not found between {from} and {to}")]
9 EdgeNotFound { from: String, to: String },
10
11 #[error("Duplicate entity: {0}")]
12 DuplicateEntity(String),
13
14 #[error("Invalid SCIP identifier: {0}")]
15 InvalidScipId(String),
16
17 #[error("Serialization error: {0}")]
18 Serialization(#[from] serde_json::Error),
19
20 #[error("Event store error: {0}")]
21 EventStore(String),
22
23 #[error("Ingestion error: {0}")]
24 Ingestion(String),
25}
26
27pub type Result<T> = std::result::Result<T, UcmError>;