better error handling for authentication

This commit is contained in:
Scott Lamb
2021-03-06 05:16:09 -08:00
parent cb4f30b5a2
commit 2d45799b7d
4 changed files with 115 additions and 51 deletions

View File

@@ -36,6 +36,15 @@ impl Error {
pub fn compat(self) -> failure::Compat<Context<ErrorKind>> {
self.inner.compat()
}
pub fn map<F>(self, op: F) -> Self
where
F: FnOnce(ErrorKind) -> ErrorKind,
{
Self {
inner: self.inner.map(op),
}
}
}
impl Fail for Error {