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` (`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//!
20//! Copyright (c) systemprompt.io — Business Source License 1.1.
21//! See <https://systemprompt.io> for licensing details.
22
23pub use systemprompt_traits::RepositoryError;
24
25pub mod macros;
26mod metadata;
27mod parse;
28mod provider;
29mod row;
30mod secrets;
31mod service;
32mod validation;
33
34pub use metadata::MetadataError;
35pub use parse::{ConfigError, ParseEnumError};
36pub use provider::{ProviderError, ProviderResult};
37pub use row::RowParseError;
38pub use secrets::SecretsError;
39pub use service::ServiceError;
40pub use validation::ConfigValidationError;