pub enum TransportError {
PackNotFound,
AccessDenied,
RemoteError(String),
RefConflict,
InvalidRef(String),
ConnectionFailed,
ServerError {
status: u16,
},
InvalidResponse,
ProtocolError,
PayloadTooLarge(usize),
InsecureScheme,
}Expand description
Errors that any transport may surface across the Transport
boundary. Implementations MAY wrap transport-specific errors
internally but MUST map them to one of these variants before
returning.
Variants§
PackNotFound
download_pack called on a digest the remote does not hold.
AccessDenied
Authentication or ACL failure (HTTP 401/403, SSH auth refusal,
S3 SignatureDoesNotMatch, …).
RemoteError(String)
Catch-all remote-side failure carrying an advisory message. The message is for operators; programs MUST NOT pattern-match on its contents.
RefConflict
update_ref CAS precondition was not satisfied. Per
SPEC-TRANSPORT §7, callers MUST treat this as
“possibly-success on retry” for .missing / .match and
confirm with read_ref.
InvalidRef(String)
Caller passed a ref name failing SPEC-REFS §3.
ConnectionFailed
Network-level failure: DNS, TCP connect, TLS handshake, SSH
subprocess spawn. Retryable (see is_retryable).
ServerError
Unexpected HTTP status or transport-protocol error. 5xx and 429 are retryable; 4xx (except 401/403/404/409/412) is not.
Fields
InvalidResponse
Server response did not match the wire contract (truncated frame, unknown opcode, bad JSON, …).
ProtocolError
Generic protocol-level failure — malformed frame, unexpected opcode order, or failed handshake.
PayloadTooLarge(usize)
Payload exceeded a transport-specific cap.
InsecureScheme
An insecure URL scheme (plain http://) was supplied for a
non-loopback host. Plain HTTP is restricted to loopback addresses
(127.0.0.1, ::1, localhost) so production traffic is never
transported in the clear.
Trait Implementations§
Source§impl Debug for TransportError
impl Debug for TransportError
Source§impl Display for TransportError
impl Display for TransportError
Source§impl Error for TransportError
impl Error for TransportError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for TransportError
impl RefUnwindSafe for TransportError
impl Send for TransportError
impl Sync for TransportError
impl Unpin for TransportError
impl UnsafeUnpin for TransportError
impl UnwindSafe for TransportError
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more