affinidi-secrets-resolver 0.5.3

Common utilities for Affinidi Trust Development Kit.
Documentation
/*!
 * Secrets Manager Errors
 */

use affinidi_crypto::CryptoError;
use affinidi_encoding::EncodingError;
use thiserror::Error;

/// Affinidi Secrets Resolver Errors
#[derive(Error, Debug)]
pub enum SecretsResolverError {
    #[error("Encoding error: {0}")]
    EncodingError(#[from] EncodingError),

    #[error("Crypto error: {0}")]
    CryptoError(#[from] CryptoError),

    #[error("Authentication Error: {0}")]
    AuthenticationError(String),
    #[error("Key Error: {0}")]
    KeyError(String),

    #[error("Encoding Error: {0}")]
    Encoding(String),

    #[error("Decoding Error: {0}")]
    Decoding(String),

    #[error("Unexpected Codec: {0}")]
    UnexpectedCodec(String),

    #[error("Unsupported Key Type: {0}")]
    UnsupportedKeyType(String),
}

pub type Result<T> = std::result::Result<T, SecretsResolverError>;