diff --git a/src/routes/index.rs b/src/routes/index.rs index 595f5d8..c8c021a 100644 --- a/src/routes/index.rs +++ b/src/routes/index.rs @@ -29,14 +29,22 @@ pub async fn index(session: Session, data: web::Data) -> Result) -> Result { let body = data.get_ref().tera .render("not_found.html", &Context::new()) - .map_err(|_| error::ErrorInternalServerError("Template error"))?; + .map_err(|e| { + #[cfg(enable_tracing)] + tracing::warn!("{}", e); + error::ErrorInternalServerError("Template error") + })?; Ok(HttpResponse::NotFound().content_type("text/html").body(body)) }