Warn when there are errors migrating domains rather than aborting migration

This commit is contained in:
mdecimus 2024-10-07 16:24:27 +02:00
parent cf093c061b
commit b74e6fd021

View file

@ -370,9 +370,12 @@ impl MigrateDirectory for Store {
key: [3u8].iter().chain(domain.as_bytes()).copied().collect(), key: [3u8].iter().chain(domain.as_bytes()).copied().collect(),
})); }));
self.write(batch.build()) if let Err(err) = self.write(batch.build()).await {
.await trc::error!(err
.caused_by(trc::location!())?; .caused_by(trc::location!())
.details("Failed to migrate domain, probably a principal already exists")
.ctx(trc::Key::Domain, domain));
}
} }
if total_domain_count > 0 || total_principal_count > 0 { if total_domain_count > 0 || total_principal_count > 0 {