pub enum ServeError {
Protocol(String),
NotOurRef(ObjectId),
ObjectMissing {
oid: ObjectId,
reason: MissingObjectReason,
},
UnknownCommand(String),
InvalidDeepenNot {
spec: String,
reason: DeepenNotError,
},
UploadFilter(UploadFilterError),
ObjectFormatMismatch {
client: String,
repository: &'static str,
},
Repository(Error),
Io(Error),
Cancelled,
PackInterrupted(Box<ServeError>),
}Expand description
Errors produced while serving a fetch or a push.
Variants§
Protocol(String)
The peer sent something that does not follow the wire protocol.
NotOurRef(ObjectId)
The client asked for an object that is not an advertised ref tip.
ObjectMissing
An object the response needs is not stored in the served repository.
Only raised before any pack byte is written, so the client gets a clean
ERR line (protocol v2) or a side-band error (v0/v1) instead of a pack cut
short. Repositories without promisor remotes report missing objects the
way they always did, as a ServeError::Repository error.
UnknownCommand(String)
The client requested a v2 command this server does not implement.
InvalidDeepenNot
A deepen-not argument (--shallow-exclude) cannot be used as a
shallow-history exclusion point.
Fields
reason: DeepenNotErrorWhy it was rejected.
UploadFilter(UploadFilterError)
An upload-pack filter request was rejected by repository config.
ObjectFormatMismatch
The client and repository disagree on the object hash algorithm.
Fields
Repository(Error)
Reading or writing repository data failed.
Io(Error)
The underlying stream failed.
Cancelled
The session was stopped by a cancel signal before finishing.
PackInterrupted(Box<ServeError>)
Sending the pack failed after part of it had gone out, so the response cannot be turned into a clean error any more. With a side band the client was told on band 3; the transport should end the response as failed rather than complete it.
Trait Implementations§
Source§impl Debug for ServeError
impl Debug for ServeError
Source§impl Display for ServeError
impl Display for ServeError
Source§impl Error for ServeError
impl Error for ServeError
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()