Weave documentation
Rust referenceloom-gateway

loom-gateway · error

Source declarations, signatures and documentation for error.

Source: sigil/weave/tools/loom-gateway/src/error.rs. SHA-256: 0af89ba889c9e4095c828f540680565e08620ed856ac61cfb418459f400baf80.

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::ApiError

Errors surfaced over the API.

#[derive(Debug, Error)]
pub enum ApiError {
    /// Resource not found (repo, commit, tree, blob).
    #[error("not found: {0}")]
    NotFound(String),

    /// Caller asked for something the gateway can't give (e.g. binary
    /// returned where text was requested).
    #[error("bad request: {0}")]
    BadRequest(String),

    /// Missing or invalid local gateway bearer capability.
    #[error("unauthorized: {0}")]
    Unauthorized(String),

    /// Underlying weave-sdk / strand / lens / locus failure.
    #[error("storage error: {0}")]
    Storage(String),

    /// JSON (de)serialization failed.
    #[error("serialization error: {0}")]
    Serialization(String),

    /// Anything else — surfaces as 500.
    #[error("internal error: {0}")]
    Internal(String),
}

Source line: 11.

On this page