aboutsummaryrefslogtreecommitdiffstats
path: root/askama_tide
diff options
context:
space:
mode:
authorLibravatar Jacob Rothstein <hi@jbr.me>2020-07-31 13:37:26 -0700
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-08-04 21:18:41 +0100
commitb801724738563cd4481c5ca2b74458a37b499d21 (patch)
tree32c68386db31f4241b93702a479c0ffb2ebe6ab8 /askama_tide
parentf1cff65699ec8103e07e2bb52b2ddf8b3f7f5345 (diff)
downloadaskama-b801724738563cd4481c5ca2b74458a37b499d21.tar.gz
askama-b801724738563cd4481c5ca2b74458a37b499d21.tar.bz2
askama-b801724738563cd4481c5ca2b74458a37b499d21.zip
tide: use set_error for correct error handling
Diffstat (limited to 'askama_tide')
-rw-r--r--askama_tide/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
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: Template>(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
}
}