src/error.rs

microclaw · crates/microclaw-core/src/error.rs · rust · MIT
database

error.rs from microclaw/microclaw

// Source: https://github.com/microclaw/microclaw | License: MIT | Copyright 2025 everettjf
// Provided via justclaw.it.com; keep this notice with the code.
use thiserror::Error;

#[derive(Error, Debug)]
#[allow(dead_code)]
pub enum MicroClawError {
    #[error("LLM API error: {0}")]
    LlmApi(String),

    #[error("Rate limited, retry after backoff")]
    RateLimited,

    #[cfg(feature = "sqlite-errors")]
    #[error("Database error: {0}")]
    Database(#[from] rusqlite::Error),

    #[cfg(feature = "http-errors")]
    #[error("HTTP error: {0}")]
    Http(#[from] reqwest::Error),

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

    #[error("IO error: {0}")]
    Io(#[from] std::io::Error),

    #[error("Tool execution error: {0}")]
    ToolExecution(String),

    #[

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key