Don't print terrible upstream errors
Some checks are pending
continuous-integration/drone/push Build is running
Some checks are pending
continuous-integration/drone/push Build is running
This commit is contained in:
parent
eb736cf413
commit
d08854c13f
|
@ -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>,
|
||||
|
|
Loading…
Reference in a new issue