hyperi-rustlib 2.8.1

There's plenty of sage advice out there about how to run Rust services in production at scale — config cascades, structured logging, masking secrets, multi-backend secrets management, Prometheus, OpenTelemetry, Kafka transports, tiered disk-spillover sinks, adaptive worker pools, graceful shutdown — but almost none of it as code you can just install and use. This is that code. Opinionated, drop-in, working out of the box. The patterns from blog posts, watercooler chats and beers with your Google mates as actual library — not a framework you assemble from twenty crates and 8 weeks of munging.
Documentation
// Project:   hyperi-rustlib
// File:      src/secrets/error.rs
// Purpose:   Secrets error types
// Language:  Rust
//
// License:   BUSL-1.1
// Copyright: (c) 2026 HYPERI PTY LIMITED

//! Error types for the secrets module.

use thiserror::Error;

/// Secrets module errors.
#[derive(Debug, Error)]
pub enum SecretsError {
    /// Secret not found.
    #[error("secret not found: {0}")]
    NotFound(String),

    /// Provider not configured.
    #[error("provider not configured: {0}")]
    ProviderNotConfigured(String),

    /// Provider communication error.
    #[error("provider error: {0}")]
    ProviderError(String),

    /// Authentication failed.
    #[error("authentication failed: {0}")]
    AuthError(String),

    /// I/O error.
    #[error("I/O error: {0}")]
    IoError(#[from] std::io::Error),

    /// Cache error.
    #[error("cache error: {0}")]
    CacheError(String),

    /// Invalid secret data.
    #[error("invalid data: {0}")]
    InvalidData(String),

    /// Refresh failed.
    #[error("refresh failed: {0}")]
    RefreshFailed(String),

    /// Configuration error.
    #[error("configuration error: {0}")]
    ConfigError(String),
}

/// Result type for secrets operations.
pub type SecretsResult<T> = Result<T, SecretsError>;