partialy implement Glue Logic
This commit is contained in:
@ -40,6 +40,10 @@ pub enum ProtocolError {
|
||||
|
||||
impl From<io::Error> for ProtocolError {
|
||||
fn from(err: io::Error) -> Self {
|
||||
ProtocolError::InternalServerError(err)
|
||||
if err.kind() == io::ErrorKind::NotFound {
|
||||
ProtocolError::FileNotFound("File Not Found!".to_string())
|
||||
} else {
|
||||
ProtocolError::InternalServerError(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user