Update show.rs

This commit is contained in:
Adrian Woźniak 2023-07-28 22:06:36 +02:00 committed by GitHub
parent 73f79112c4
commit bd24116e50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,6 +70,10 @@ pub async fn show<E: ActixAdminViewModelTrait>(
let body = actix_admin.tera let body = actix_admin.tera
.render("show.html", &ctx) .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)) Ok(http_response_code.content_type("text/html").body(body))
} }