git_bot_feedback/
error.rs1use thiserror::Error;
2
3use crate::OutputVariable;
4
5#[derive(Debug, Error)]
7pub enum RestClientError {
8 #[error("{0}")]
10 Request(#[from] reqwest::Error),
11
12 #[error("{0}")]
14 Io(#[from] std::io::Error),
15
16 #[error("Rate Limit exceeded")]
18 RateLimit,
19
20 #[error("Failed to clone request object for auto-reties")]
22 RequestCloneError,
23
24 #[error("Tried to create a header value from invalid string data")]
26 InvalidHeaderValue(#[from] reqwest::header::InvalidHeaderValue),
27
28 #[error("{0}")]
30 UrlParseError(#[from] url::ParseError),
31
32 #[error("{0}")]
34 JsonError(#[from] serde_json::Error),
35
36 #[error("{0}")]
38 EnvVarError(#[from] std::env::VarError),
39
40 #[error("OutputVariable is malformed: {0}")]
42 OutputVarError(OutputVariable),
43}