From d411355bec22ddc37642b49c5860c6c43df990f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Wo=C5=BAniak?= Date: Fri, 28 Jul 2023 22:06:36 +0200 Subject: [PATCH] Update show.rs --- src/routes/show.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/routes/show.rs b/src/routes/show.rs index bf957ec..29e8e38 100644 --- a/src/routes/show.rs +++ b/src/routes/show.rs @@ -70,6 +70,10 @@ pub async fn show( let body = actix_admin.tera .render("show.html", &ctx) - .map_err(|err| error::ErrorInternalServerError(format!("{:?}", err)))?; + .map_err(|err| { + #[cfg(enable_tracing)] + tracing::error!("{err}"); + error::ErrorInternalServerError(format!("{:?}", err)) + })?; Ok(http_response_code.content_type("text/html").body(body)) -} \ No newline at end of file +}