pub enum AuthError {
NoConfigDir,
Read(PathBuf, Error),
Write(PathBuf, Error),
Parse(PathBuf, String),
Serialize(String),
EmptyKey(String),
UnusableKey(String),
KeyCommand {
index: usize,
cause: KeyCommandError,
},
}Expand description
What can go wrong reading or writing the store.
Variants§
NoConfigDir
Read(PathBuf, Error)
Write(PathBuf, Error)
Parse(PathBuf, String)
Serialize(String)
Serializing the store failed. Distinct from Self::Parse, which is
about reading: a write failure reported as “could not parse” sends the
reader looking at the file rather than at what drep tried to write.
EmptyKey(String)
UnusableKey(String)
A key carrying a control character cannot be sent as an HTTP header, so storing it would defer a guaranteed failure to the first request.
KeyCommand
A configured api_key_command did not produce a credential.
Fatal, and fatal here: the provider chain does not exist yet, so there is nothing to fail over to - and failing over would be the wrong answer anyway, for the reason a 401 does not fail over. Routing around a broken credential path is what hides it.
The entry is numbered in file order, matching ConfigError, because that
is the numbering a user can count blocks in drep.toml to check.
Trait Implementations§
Source§impl Error for AuthError
impl Error for AuthError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()