pub enum ZenodoError {
Show 14 variants
Http {
status: StatusCode,
message: Option<String>,
field_errors: Vec<FieldError>,
raw_body: Option<String>,
},
Transport(Error),
Json(Error),
Io(Error),
Url(ParseError),
EnvVar {
name: String,
source: VarError,
},
InvalidState(String),
MissingLink(&'static str),
MissingFile {
key: String,
},
DuplicateUploadFilename {
filename: String,
},
ConflictingDraftFile {
filename: String,
},
UnsupportedSelector(String),
ChecksumMismatch {
expected: String,
actual: String,
},
Timeout(&'static str),
}Expand description
Errors produced by the Zenodo client.
Variants§
Http
Zenodo returned a non-success HTTP status.
Fields
status: StatusCodeHTTP status returned by Zenodo.
field_errors: Vec<FieldError>Field-level validation errors extracted from the response body.
Transport(Error)
A transport error occurred while sending or receiving a request.
Json(Error)
JSON serialization or deserialization failed.
Io(Error)
A local I/O operation failed.
Url(ParseError)
A URL could not be parsed or joined.
Tuple Fields
0: ParseErrorUnderlying URL parse error.
EnvVar
A required environment variable could not be read.
InvalidState(String)
Zenodo returned data that violates a workflow invariant.
MissingLink(&'static str)
A required link relation was missing from a Zenodo payload.
MissingFile
A requested file key was not present on a record.
DuplicateUploadFilename
Multiple uploads targeted the same final filename.
ConflictingDraftFile
A keep-existing upload would overwrite an existing draft file.
UnsupportedSelector(String)
A selector could not be resolved to a record or artifact.
ChecksumMismatch
A checksum validation step failed.
Timeout(&'static str)
Polling timed out before Zenodo reached the requested state.
Trait Implementations§
Source§impl Debug for ZenodoError
impl Debug for ZenodoError
Source§impl Display for ZenodoError
impl Display for ZenodoError
Source§impl Error for ZenodoError
impl Error for ZenodoError
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()