1use thiserror::Error;
3
4#[derive(Error, Debug)]
6pub enum ActionsError {
7 #[error("Failed to load environment: `{0}`")]
9 FailedLoading(String),
10
11 #[error("Failed to get input value: `{0}`")]
13 InputError(String),
14
15 #[error("Input Type Error: `{0}` (Expected: `{1}`)")]
17 InputTypeError(String, String),
18
19 #[error("{0}")]
21 IoError(#[from] std::io::Error),
22
23 #[cfg(feature = "toolcache")]
25 #[error("Tool Cache Error: `{0}`")]
26 ToolCacheError(String),
27
28 #[cfg(feature = "toolcache")]
30 #[error("Tool Not Found in Cache: `{0}`")]
31 ToolNotFound(String),
32
33 #[cfg(feature = "toolcache")]
35 #[error("Glob Pattern Error")]
36 PatternError(#[from] glob::PatternError),
37
38 #[cfg(feature = "octocrab")]
40 #[error("Octocrab Error: `{0}`")]
41 OctocrabError(String),
42
43 #[cfg(feature = "toolcache")]
45 #[error("HTTP Header Error: `{0}`")]
46 HeaderError(#[from] http::header::InvalidHeaderValue),
47
48 #[cfg(feature = "toolcache")]
50 #[error("HTTP Error: `{0}`")]
51 ReqwestError(#[from] reqwest::Error),
52
53 #[error("Unable to parse repo reference: `{0}`")]
55 RepositoryReferenceError(String),
56
57 #[error("IO Error: `{0}`")]
59 IOError(String),
60
61 #[error("Not Implemented")]
63 NotImplemented,
64}