tsafe-azure 1.0.3

Azure Key Vault integration for tsafe — optional secret pull.
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
pub enum KvError {
    /// A required environment variable is missing or invalid.
    #[error("Key Vault configuration error: {0}")]
    Config(String),

    /// Token acquisition failed (SP or IMDS).
    #[error("authentication failed: {0}")]
    Auth(String),

    /// The requested secret does not exist in the vault.
    #[error("secret not found in Key Vault: {0}")]
    NotFound(String),

    /// Unexpected HTTP status returned by Key Vault.
    #[error("Key Vault HTTP {status}: {message}")]
    Http { status: u16, message: String },

    /// Network or ureq transport error.
    #[error("transport error: {0}")]
    Transport(String),

    /// Secret is in a soft-deleted but recoverable state in Azure Key Vault.
    /// The operator must recover or purge the secret in the Azure portal before retrying.
    #[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),
}