log-genius 0.1.0

An AI-powered CLI to instantly analyze and explain complex logs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use thiserror::Error;

#[derive(Debug, Error)]
pub enum AppError {
    #[error("I/O error: {0}")]
    Io(#[from] std::io::Error),

    #[error("API request failed: {0}")]
    Api(#[from] reqwest::Error),

    #[error("OPENAI_API_KEY is not set.")]
    ApiKeyMissing,

    #[error("Failed to get a response from the AI.")]
    NoResponse,
}

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