h33-client 0.1.0

H33.ai REST API client — async, typed responses, post-quantum attestation verification
Documentation
//! Error types for the H33 client SDK

/// H33 client errors
#[derive(Debug, thiserror::Error)]
pub enum H33Error {
    /// HTTP transport error
    #[error("HTTP error: {0}")]
    Http(#[from] reqwest::Error),

    /// API returned an error response
    #[error("API error ({status}): {message}")]
    Api {
        status: u16,
        error_code: String,
        message: String,
        hint: Option<String>,
    },

    /// Not connected — call connect() first
    #[error("Not connected: call client.connect() first")]
    NotConnected,

    /// FHE not initialized — call fhe_init() first
    #[error("FHE not initialized: call client.fhe_init() first")]
    FheNotInitialized,

    /// JSON serialization error
    #[error("JSON error: {0}")]
    Json(#[from] serde_json::Error),
}

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