From 51b3aa9b9e4dbc03abfdfe687cb3d953a4b85a9a Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Sun, 21 Apr 2019 18:25:54 +0200 Subject: [PATCH] Add custom error pages --- src/error.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/error.rs b/src/error.rs index 794abf9..0445d9d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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 {}