Add custom error pages

This commit is contained in:
Valentin Brandl 2019-04-21 18:25:54 +02:00
parent f832e10fac
commit 51b3aa9b9e
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D

View File

@ -30,6 +30,12 @@ impl ResponseError for Error {
.content_type("text/html")
.body(P500)
}
fn render_response(&self) -> HttpResponse {
HttpResponse::InternalServerError()
.content_type("text/html")
.body(P500)
}
}
impl std::error::Error for Error {}