Formatting
This commit is contained in:
parent
8354eeff1d
commit
9f84b352b9
1 changed files with 8 additions and 6 deletions
|
@ -64,10 +64,12 @@ error_chain! {
|
|||
impl<'r> rocket::response::Responder<'r> for Error {
|
||||
fn respond_to(self, _: &rocket::request::Request) -> rocket::response::Result<'r> {
|
||||
let mut build = rocket::response::Response::build();
|
||||
build.status(match self.0 {
|
||||
build
|
||||
.status(match self.0 {
|
||||
ErrorKind::FileNotFound => rocket::http::Status::NotFound,
|
||||
_ => rocket::http::Status::InternalServerError,
|
||||
}).ok()
|
||||
})
|
||||
.ok()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue