error handling

This commit is contained in:
2025-10-29 11:14:19 +01:00
parent ac27a9ab36
commit ee8955574f
10 changed files with 102 additions and 36 deletions
+4 -1
View File
@@ -57,7 +57,10 @@ impl TenantService {
let mut conn = self
.pool
.get()
.map_err(|err| AppError::internal(format!("database pool error: {err}")))?;
.map_err(|err| {
tracing::error!(error = ?err, "database pool error");
AppError::internal("database pool error")
})?;
let tenant = loader(&mut conn)?;
Ok(tenant)
}