Don't print terrible upstream errors
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
asonix 2023-07-17 22:01:31 -05:00
parent eb736cf413
commit d08854c13f

View file

@ -345,6 +345,15 @@ pub struct Error {
kind: ErrorKind,
}
impl Error {
pub(crate) fn upstream_error(&self) -> Option<&str> {
match self.kind {
ErrorKind::UploadFailed(ref msg) => Some(msg),
_ => None,
}
}
}
impl<T> From<T> for Error
where
ErrorKind: From<T>,