mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2024-11-24 06:19:46 +00:00
Warn when there are errors migrating domains rather than aborting migration
This commit is contained in:
parent
cf093c061b
commit
b74e6fd021
1 changed files with 6 additions and 3 deletions
|
@ -370,9 +370,12 @@ impl MigrateDirectory for Store {
|
|||
key: [3u8].iter().chain(domain.as_bytes()).copied().collect(),
|
||||
}));
|
||||
|
||||
self.write(batch.build())
|
||||
.await
|
||||
.caused_by(trc::location!())?;
|
||||
if let Err(err) = self.write(batch.build()).await {
|
||||
trc::error!(err
|
||||
.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 {
|
||||
|
|
Loading…
Reference in a new issue