use thiserror::Error;
#[derive(Debug, Error)]
pub enum KeePassError {
#[error("failed to open KDBX file: {0}")]
Open(String),
#[error("wrong master password or key file")]
Auth,
#[error("password required but the env var '{0}' is not set")]
PasswordRequired(String),
#[error("group '{0}' not found in database")]
GroupNotFound(String),
#[error("failed to read key file '{path}': {source}")]
KeyFile {
path: String,
source: std::io::Error,
},
}