From fa0c2865366b1bb65a2977c4b9608c9a92fc5889 Mon Sep 17 00:00:00 2001 From: boastful-squirrel Date: Wed, 1 May 2019 18:23:29 +0200 Subject: Use HTTP StatusCode for error title --- src/renderer.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/renderer.rs') diff --git a/src/renderer.rs b/src/renderer.rs index 03c46d8..acef208 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -1,3 +1,4 @@ +use actix_web::http::StatusCode; use chrono::{DateTime, Duration, Utc}; use chrono_humanize::{Accuracy, HumanTime, Tense}; use maud::{html, Markup, PreEscaped, DOCTYPE}; @@ -846,6 +847,7 @@ fn humanize_systemtime(src_time: Option) -> Option { /// Renders an error on the webpage pub fn render_error( error_description: &str, + error_code: StatusCode, return_address: &str, sort_method: Option, sort_order: Option, @@ -867,9 +869,9 @@ pub fn render_error( html! { body { - (page_header("Error", color_scheme, false, true)) + (page_header(&error_code.to_string(), color_scheme, false, true)) div.error { - p { "Error" } + p { (error_code.to_string()) } @for error in error_description.lines() { p { (error) } } -- cgit v1.2.3