node: Rename `InvalidPacketLine` error variant

In case of timeout on reading the packet-line, we would get this error.
It would be confusing, as the packet-line wasn't invalid, just never
received.
This commit is contained in:
Alexis Sellier 2023-05-23 14:22:07 +02:00
parent 366e61a053
commit b8c2f2a647
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ pub enum UploadError {
#[error("worker failed to connect to git daemon: {0}")]
DaemonConnectionFailed(io::Error),
#[error("error parsing git command packet-line: {0}")]
InvalidPacketLine(io::Error),
PacketLine(io::Error),
#[error(transparent)]
Io(#[from] io::Error),
}
@ -308,7 +308,7 @@ impl Worker {
return Ok(ControlFlow::Break(()));
}
Err(err) => {
return Err(UploadError::InvalidPacketLine(err));
return Err(UploadError::PacketLine(err));
}
};
log::debug!(target: "worker", "Received Git request pktline for {rid}..");