OpenAgentID documentation
Source referencesRust module referenceopenagent-weave

openagent-weave · error

Declared module signatures, types, configuration, and source documentation.

Source: openagent-sdk/adapters/weave/src/error.rs. SHA-256: 93dc23119a78ed4187935042cb3b6cce37c59b653a44c0b1390b9dfc3aa5f250.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

error::WeaveAuthError

Errors specific to the Weave/libp2p OAAP adapter.

#[derive(Debug, Error)]
pub enum WeaveAuthError {
    /// CBOR encoding or decoding failed.
    #[error("cbor codec error: {0}")]
    Codec(String),

    /// Message exceeds the configured maximum frame size.
    #[error("message too large: {size} bytes exceeds limit of {limit} bytes")]
    MessageTooLarge {
        /// Actual message size in bytes.
        size: usize,
        /// Configured maximum.
        limit: usize,
    },

    /// No established auth session for the given peer.
    #[error("peer not authenticated: {peer_id}")]
    PeerNotAuthenticated {
        /// The libp2p peer ID.
        peer_id: String,
    },

    /// A handshake is already in progress for this peer.
    #[error("handshake already in progress for peer: {peer_id}")]
    HandshakeInProgress {
        /// The libp2p peer ID.
        peer_id: String,
    },

    /// The handshake timed out waiting for a response.
    #[error("handshake timeout after {elapsed_ms}ms")]
    Timeout {
        /// Milliseconds elapsed before timeout.
        elapsed_ms: u64,
    },

    /// Received an unexpected message type for the current handshake state.
    #[error("unexpected message: expected {expected}, got {actual}")]
    UnexpectedMessage {
        /// What was expected.
        expected: String,
        /// What was received.
        actual: String,
    },

    /// Error from the underlying OAAP protocol layer.
    #[error("auth protocol error: {0}")]
    Protocol(#[from] openagent_auth_protocol::AuthProtocolError),

    /// libp2p dial or connection error.
    #[error("connection error: {0}")]
    Connection(String),

    /// Internal error.
    #[error("internal error: {0}")]
    Internal(String),
}

Source line: 8.

On this page