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
@@ -72,7 +72,10 @@ impl From<diesel::result::Error> for AppError {
fn from(value: diesel::result::Error) -> Self {
match value {
diesel::result::Error::NotFound => AppError::not_found(),
_ => AppError::internal(value),
other => {
tracing::error!(error = ?other, "database operation failed");
AppError::internal("database operation failed")
}
}
}
}