Weave documentation
Rust referenceweave-browser-engine

weave-browser-engine · error

Source declarations, signatures and documentation for error.

Reviewed implementation boundary: The serve path warns but still binds when WEAVE_API_KEY is absent; the authentication check then allows requests. Configure and verify authorization before exposing a server. See /libraries/weave-browser-engine/research-server.

Source: sigil/weave/libs/weave-browser-engine/src/error.rs. SHA-256: b4b08c73c9a6460daeb59a5543de6220c722641d4d440b1188b089b5c7cb23b6.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

error::BrowserError

Error types for the browser engine. All errors produced by the browser engine.

#[derive(Debug, thiserror::Error)]
pub enum BrowserError {
    /// HTTP request failed.
    #[error("http request failed: {0}")]
    HttpRequest(String),

    /// Failed to read the response body.
    #[error("failed to read response body: {0}")]
    ResponseBody(String),

    /// Invalid URL format.
    #[error("invalid URL: {0}")]
    InvalidUrl(String),

    /// Protocol resolution failed.
    #[error("protocol error: {0}")]
    Protocol(String),

    /// Weave URL parsing or resolution failed.
    #[error("invalid weave URL: {0}")]
    InvalidWeaveUrl(String),

    /// Locus drive read failed.
    #[error("locus read failed: {0}")]
    LocusReadFailed(String),

    /// Remote strand fetch failed.
    #[error("remote fetch failed: {0}")]
    RemoteFetchFailed(String),

    /// HNS resolution is not yet implemented.
    #[error("HNS resolution pending")]
    HnsPending,

    /// CSS selector parsing failed.
    #[error("invalid CSS selector: {0}")]
    InvalidSelector(String),

    /// Search engine error.
    #[error("search failed: {0}")]
    SearchFailed(String),

    /// File perception error.
    #[error("perception error: {0}")]
    PerceptionError(String),

    /// Research engine error.
    #[error("research error: {0}")]
    ResearchError(String),

    /// Server error.
    #[error("server error: {0}")]
    ServerError(String),

    /// File not found.
    #[error("file not found: {0}")]
    FileNotFound(String),

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

Source line: 5.

error::BrowserResult

Convenience Result alias.

pub type BrowserResult<T> = Result<T, BrowserError>;

Source line: 68.

On this page