pub enum Error {
NotARepository(String),
Serve(ServeError),
Repository(Box<Error>),
Io(Error),
}Expand description
Errors from smart-protocol handlers.
Variants§
NotARepository(String)
The path does not look like a git repository.
Serve(ServeError)
Serving the wire protocol failed.
Repository(Box<Error>)
Opening or reading repository state failed.
Io(Error)
Buffered I/O failed while collecting the response.
Implementations§
Source§impl Error
impl Error
Sourcepub fn request_stream_error(&self) -> Option<&Error>
pub fn request_stream_error(&self) -> Option<&Error>
The I/O error from reading the client’s request stream, for a failed
receive_pack::stateless_rpc_from_reader exchange.
Servers use this to answer a request body that could not be read (truncated,
badly encoded, or rejected by the server’s own decoding limits) with a client
error rather than a server error. During receive-pack that is the only source of
stream errors: the response is collected in memory, and repository failures are
reported as other serve::ServeError variants or inside the status report.
Upload-pack can also return stream errors while reading repository data. When the
inner error is grit_lib::remote::serve::RequestBodyLimitExceeded, smart HTTP
maps the failure to 413; other upload-pack stream errors are usually server faults.
§Returns
Some with the request read error, or None for every other failure.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()