All MagicAF operations return Result<T, MagicError>. The error type is designed for both Rust-native ? propagation and FFI-friendly numeric codes.
Module: magicaf_core::errors
MagicError pub enum MagicError { EmbeddingError { message: String, source: Option<Box<dyn Error + Send + Sync>> }, VectorStoreError { message: String, source: Option<Box<dyn Error + Send + Sync>> }, LlmError { message: String, source: Option<Box<dyn Error + Send + Sync>> }, ConfigError { message: String }, AdapterError { message: String, source: Option<Box<dyn Error + Send + Sync>> }, HttpError { message: String, status_code: Option<u16>, source: Option<...> }, SerializationError { message: String, source: Option<Box<dyn Error + Send + Sync>> }, HealthCheckFailed { service: String }, Internal { message: String, source: Option<Box<dyn Error + Send + Sync>> }, } Variants Variant Code When EmbeddingError 1000 Embedding service returned an error or was unreachable VectorStoreError 2000 Vector store returned an error or was unreachable LlmError 3000 LLM service returned an error or was unreachable ConfigError 4000 Configuration value was missing or invalid AdapterError 5000 An adapter (formatter, builder, parser) failed HttpError 6000 An HTTP request failed SerializationError 7000 Serialization or deserialization failed HealthCheckFailed 8000 A health check failed against an upstream service Internal 9000 Unexpected internal error Numeric Error Codes Every variant maps to a stable u32 code, suitable for FFI boundaries:
...