tsafe-cli 1.0.22

tsafe CLI — local secret and credential manager (replaces .env files)
Documentation
//! Error types for the KeePass cloud-pull provider.

use thiserror::Error;

#[derive(Debug, Error)]
pub enum KeePassError {
    /// The `.kdbx` file could not be opened or parsed.
    #[error("failed to open KDBX file: {0}")]
    Open(String),

    /// The master password or key file was rejected by the database.
    #[error("wrong master password or key file")]
    Auth,

    /// A password is required (either via `password_env` or `keyfile_path`)
    /// but `TSAFE_KP_PASSWORD` (or the configured env var) is not set.
    #[error("password required but the env var '{0}' is not set")]
    PasswordRequired(String),

    /// The requested group name was not found in the database root.
    #[error("group '{0}' not found in database")]
    GroupNotFound(String),

    /// The key file path could not be read.
    #[error("failed to read key file '{path}': {source}")]
    KeyFile {
        path: String,
        source: std::io::Error,
    },
}