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