1use thiserror::Error;
7
8#[derive(Error, Debug)]
10pub enum SdkError {
11 #[error("Core agent error: {0}")]
13 Core(#[from] crate::core::SdkError),
14
15 #[error("Failed to fetch topology: {0}")]
17 TopologyFetch(#[from] reqwest::Error),
18
19 #[error("Encoding failed: {0}")]
21 EncodingFailed(String),
22
23 #[error("Decoding failed: {0}")]
25 DecodingFailed(String),
26
27 #[error("Invalid configuration: {0}")]
29 InvalidConfiguration(String),
30
31 #[error("Topology not found for cortical ID: {0}")]
33 TopologyNotFound(String),
34
35 #[error("FEAGI data structure error: {0}")]
37 FeagiData(#[from] feagi_structures::FeagiDataError),
38
39 #[error("Device registration sync failed: {0}")]
41 DeviceRegistrationSyncFailed(String),
42
43 #[error("{0}")]
45 Other(#[from] anyhow::Error),
46}
47
48pub type Result<T> = std::result::Result<T, SdkError>;