Update lib.rs

This commit is contained in:
Adrian Woźniak 2023-07-29 20:49:21 +02:00 committed by GitHub
parent a7548208c9
commit 60549bd227
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,6 +116,8 @@ pub enum ActixAdminError {
impl error::ResponseError for ActixAdminError { impl error::ResponseError for ActixAdminError {
fn error_response(&self) -> HttpResponse { fn error_response(&self) -> HttpResponse {
#[cfg(enable-tracing)]
tracing::debug!("{self}");
HttpResponse::build(self.status_code()) HttpResponse::build(self.status_code())
.insert_header(ContentType::html()) .insert_header(ContentType::html())
.body(self.to_string()) .body(self.to_string())