#[cfg(feature = "tracing")]
use tracing;
pub fn db_error<T, E>(result: Result<T, E>) -> Result<T, E>
where
E: std::fmt::Display,
{
#[cfg(feature = "tracing")]
if let Err(e) = result {
tracing::warn!("Database Error; {}", e);
return Err(e);
}
result
}