Add error messages
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Elscrux 2024-03-17 14:57:47 +01:00
parent 3c87b5cea7
commit 9b491aba5b
1 changed files with 6 additions and 3 deletions

View File

@ -68,19 +68,22 @@ func (s *MigrationListener) Handle(msg *message.Message) (err error) {
err = ms.Migrate(event.User)
if err != nil {
return
log.Errorf("[Migration] Failed to migrate %d from %s for user %d: %s", m.ID, event.MigratorKind, event.User.ID, err)
return err
}
err = migration.FinishMigration(m)
if err != nil {
return
log.Errorf("[Migration] Failed to finish migration %d from %s for user %d: %s", m.ID, event.MigratorKind, event.User.ID, err)
return err
}
err = notifications.Notify(event.User, &MigrationDoneNotification{
MigratorName: ms.Name(),
})
if err != nil {
return
log.Errorf("[Migration] Failed to notify migration %d from %s for user %d: %s", m.ID, event.MigratorKind, event.User.ID, err)
return err
}
log.Debugf("[Migration] Successfully done migration %d from %s for user %d", m.ID, event.MigratorKind, event.User.ID)