Update show.rs

This commit is contained in:
Adrian Woźniak 2023-07-28 22:06:36 +02:00
parent da466306e1
commit d411355bec

View File

@ -70,6 +70,10 @@ pub async fn show<E: ActixAdminViewModelTrait>(
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))
}
}