systemprompt_models/errors/mod.rs
1//! Cross-cutting error types for `systemprompt-models`.
2//!
3//! This module hosts `thiserror`-derived enums returned by the public
4//! surface of this crate. Public APIs never return `anyhow::Error`; they
5//! convert to one of the typed enums declared here. Downstream entry
6//! crates that use `anyhow` (`entry/cli`, `entry/api`) continue to consume
7//! these errors transparently via `?` because every enum implements
8//! `std::error::Error`.
9//!
10//! Public re-exports:
11//!
12//! - [`ParseEnumError`], [`ConfigError`] — string parsing failures.
13//! - [`ConfigValidationError`] — services / agents / plugins validation.
14//! - [`RowParseError`] — JSON-row deserialization failures.
15//! - [`MetadataError`] — MCP `_meta` payload decoding.
16//! - [`SecretsError`] — on-disk secrets document.
17//! - [`ProviderError`] / [`ProviderResult`] — plug-in trait abstractions.
18//! - [`ServiceError`] — application-tier umbrella enum.
19
20pub use systemprompt_traits::RepositoryError;
21
22pub mod macros;
23mod metadata;
24mod parse;
25mod provider;
26mod row;
27mod secrets;
28mod service;
29mod validation;
30
31pub use metadata::MetadataError;
32pub use parse::{ConfigError, ParseEnumError};
33pub use provider::{ProviderError, ProviderResult};
34pub use row::RowParseError;
35pub use secrets::SecretsError;
36pub use service::ServiceError;
37pub use validation::ConfigValidationError;