Skip to main content

zeph_config/
error.rs

1// SPDX-FileCopyrightText: 2026 Andrei G <bug-ops>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4use zeph_common::secret::VaultError;
5
6/// Error type for configuration operations.
7///
8/// Covers file I/O, TOML parsing, validation, and vault resolution.
9#[derive(Debug, thiserror::Error)]
10pub enum ConfigError {
11    #[error("failed to read config file: {0}")]
12    Io(#[from] std::io::Error),
13    #[error("failed to parse config file: {0}")]
14    Parse(#[from] toml::de::Error),
15    #[error("config validation failed: {0}")]
16    Validation(String),
17    #[error("vault error: {0}")]
18    Vault(#[from] VaultError),
19}