Skip to main content

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` continue to consume these errors transparently
7//! via `?` because every enum implements `std::error::Error`.
8//!
9//! Public re-exports:
10//!
11//! - [`ParseEnumError`], [`ConfigError`] — string parsing failures.
12//! - [`ConfigValidationError`] — services / agents / plugins validation.
13//! - [`RowParseError`] — JSON-row deserialization failures.
14//! - [`MetadataError`] — MCP `_meta` payload decoding.
15//! - [`SecretsError`] — on-disk secrets document.
16//! - [`ModuleError`] — module manifest resolution.
17//! - [`ProviderError`] / [`ProviderResult`] — plug-in trait abstractions.
18//! - [`CoreError`] — legacy umbrella enum with HTTP status mapping.
19//! - [`ServiceError`] — application-tier umbrella enum.
20
21pub use systemprompt_traits::RepositoryError;
22
23mod core;
24pub mod macros;
25mod metadata;
26mod module;
27mod parse;
28mod provider;
29mod row;
30mod secrets;
31mod service;
32mod validation;
33
34pub use core::CoreError;
35pub use metadata::MetadataError;
36pub use module::ModuleError;
37pub use parse::{ConfigError, ParseEnumError};
38pub use provider::{ProviderError, ProviderResult};
39pub use row::RowParseError;
40pub use secrets::SecretsError;
41pub use service::ServiceError;
42pub use validation::ConfigValidationError;