use thiserror::Error;
#[derive(Debug, Error)]
pub enum KvError {
#[error("Key Vault configuration error: {0}")]
Config(String),
#[error("authentication failed: {0}")]
Auth(String),
#[error("secret not found in Key Vault: {0}")]
NotFound(String),
#[error("Key Vault HTTP {status}: {message}")]
Http { status: u16, message: String },
#[error("transport error: {0}")]
Transport(String),
#[error(
"secret '{0}' is in a soft-deleted but recoverable state in Azure Key Vault — \
recover or purge it in the Azure portal (Portal > Key Vault > Deleted secrets) before retrying"
)]
SoftDeleted(String),
}