1use std::io;
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5 #[error("failed to build HTTP client")]
6 HttpClient(#[source] reqwest::Error),
7
8 #[error("LLM not ready within {timeout_s:.0}s at {url}")]
9 LlmTimeout { url: String, timeout_s: f64 },
10
11 #[error("LLM subprocess exited before becoming ready: {status}")]
12 LlmProcessExited { status: String },
13
14 #[error(transparent)]
15 Io(#[from] io::Error),
16
17 #[error("invalid header value")]
18 InvalidHeader(#[from] reqwest::header::InvalidHeaderValue),
19
20 #[error("{0}")]
21 Config(String),
22}