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)]
10#[non_exhaustive]
11pub enum ConfigError {
12    #[error("failed to read config file: {0}")]
13    Io(#[from] std::io::Error),
14    #[error("failed to parse config file: {0}")]
15    Parse(#[from] toml::de::Error),
16    #[error("config validation failed: {0}")]
17    Validation(String),
18    #[error("vault error: {0}")]
19    Vault(#[from] VaultError),
20}