From b801724738563cd4481c5ca2b74458a37b499d21 Mon Sep 17 00:00:00 2001 From: Jacob Rothstein Date: Fri, 31 Jul 2020 13:37:26 -0700 Subject: tide: use set_error for correct error handling --- askama_tide/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'askama_tide/src') diff --git a/askama_tide/src/lib.rs b/askama_tide/src/lib.rs index 0458348..59f90e9 100644 --- a/askama_tide/src/lib.rs +++ b/askama_tide/src/lib.rs @@ -23,9 +23,9 @@ pub fn into_response(t: &T, ext: &str) -> Response { response } - Err(e) => { + Err(error) => { let mut response = Response::new(500); - response.set_body(e.to_string()); + response.set_error(error); response } } -- cgit