ghactions_core/
errors.rs

1//! Errors for the core library
2use thiserror::Error;
3
4/// Actions Error
5#[derive(Error, Debug)]
6pub enum ActionsError {
7    /// Failed to load the environment
8    #[error("Failed to load environment: `{0}`")]
9    FailedLoading(String),
10
11    /// Failed to get input value from environment
12    #[error("Failed to get input value: `{0}`")]
13    InputError(String),
14
15    /// Input Type Error
16    #[error("Input Type Error: `{0}` (Expected: `{1}`)")]
17    InputTypeError(String, String),
18
19    /// Tool Cache Error
20    #[cfg(feature = "toolcache")]
21    #[error("Tool Cache Error: `{0}`")]
22    ToolCacheError(String),
23
24    /// Tool Not Found in Cache
25    #[cfg(feature = "toolcache")]
26    #[error("Tool Not Found in Cache: `{0}`")]
27    ToolNotFound(String),
28
29    /// Glob Error
30    #[cfg(feature = "toolcache")]
31    #[error("Glob Pattern Error")]
32    PatternError(#[from] glob::PatternError),
33
34    /// Octocrab Error
35    #[cfg(feature = "octocrab")]
36    #[error("Octocrab Error: `{0}`")]
37    OctocrabError(String),
38
39    /// Failed parsing the repository reference
40    #[error("Unable to parse repo reference: `{0}`")]
41    RepositoryReferenceError(String),
42
43    /// IO Error
44    #[error("IO Error: `{0}`")]
45    IOError(String),
46
47    /// Not Implemented
48    #[error("Not Implemented")]
49    NotImplemented,
50}