diff --git a/src/main.rs b/src/main.rs index 96e4901..e1b5b74 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 From for Error where ErrorKind: From,