sqlite_store: Add option to skip broken objects and add validation on start-up

This commit is contained in:
Lennart
2026-01-19 14:48:21 +01:00
parent 0eef4ffabf
commit 15e1509fe3
9 changed files with 156 additions and 113 deletions

View File

@@ -18,7 +18,7 @@ impl From<sqlx::Error> for Error {
sqlx::Error::RowNotFound => Self::StoreError(rustical_store::Error::NotFound),
sqlx::Error::Database(err) => {
if err.is_unique_violation() {
warn!("{err:?}");
warn!("{err}");
Self::StoreError(rustical_store::Error::AlreadyExists)
} else {
Self::SqlxError(sqlx::Error::Database(err))