pub enum TransferError {
ServerObject(ObjectError),
NoDownloadAction,
ActionStatus {
status: u16,
url: String,
},
Http(Error),
Io(Error),
Store(StoreError),
InvalidOid(OidParseError),
}Expand description
Why a per-object transfer failed.
Errors with is_retryable() == true are retried by the queue up to
TransferConfig::max_attempts;
everything else fails fast.
Variants§
ServerObject(ObjectError)
The batch endpoint returned a per-object error (404, 410, 422, …). Not retryable: the server has already classified the object.
NoDownloadAction
The batch response listed the object with neither actions nor
error for a download — the spec forbids this, but real servers do
it occasionally; we surface it instead of panicking.
ActionStatus
The action URL responded with a non-success status. The URL is
embedded in the Display impl so users can
see which endpoint failed (in particular, what insteadOf
rewriting did to the original batch URL — see t-pull’s
pull with invalid insteadof).
Http(Error)
HTTP transport failure (connection reset, TLS error, …). Retryable.
Io(Error)
Local I/O while reading the object file (uploads) or the staging tempfile (downloads).
Store(StoreError)
The local store rejected the bytes — most importantly, hash mismatch after a download. Not retryable per attempt: the bytes the server gave us did not hash to what they promised.
InvalidOid(OidParseError)
The OID returned by the server is not valid hex.
Implementations§
Source§impl TransferError
impl TransferError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Worth another attempt? Network blips and 5xx are retryable; spec violations and hash mismatches are not.
Trait Implementations§
Source§impl Debug for TransferError
impl Debug for TransferError
Source§impl Display for TransferError
impl Display for TransferError
Source§impl Error for TransferError
impl Error for TransferError
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()
Source§impl From<ApiError> for TransferError
impl From<ApiError> for TransferError
Source§impl From<Error> for TransferError
impl From<Error> for TransferError
Source§impl From<Error> for TransferError
impl From<Error> for TransferError
Source§impl From<OidParseError> for TransferError
impl From<OidParseError> for TransferError
Source§fn from(source: OidParseError) -> Self
fn from(source: OidParseError) -> Self
Source§impl From<StoreError> for TransferError
impl From<StoreError> for TransferError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Auto Trait Implementations§
impl Freeze for TransferError
impl !RefUnwindSafe for TransferError
impl Send for TransferError
impl Sync for TransferError
impl Unpin for TransferError
impl UnsafeUnpin for TransferError
impl !UnwindSafe for TransferError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.