Render 404 when page not found

This commit is contained in:
Kitaiti Makoto 2022-05-04 21:21:58 +09:00
parent 812fd3d956
commit b7ea154e51

View file

@ -21,8 +21,9 @@ impl<'r> Responder<'r> for ErrorPage {
warn!("{:?}", self.0); warn!("{:?}", self.0);
match self.0 { match self.0 {
Error::NotFound => Err(Status::NotFound), Error::NotFound | Error::Unauthorized | Error::Db(diesel::result::Error::NotFound) => {
Error::Unauthorized => Err(Status::NotFound), Err(Status::NotFound)
}
_ => Err(Status::InternalServerError), _ => Err(Status::InternalServerError),
} }
} }