SystemStore migration to return plain errors (#14835)

* SystemStore migration to return plain errors

* Fix nilness

* Fix translations

* Fix merge

* Fix layers

* Fix merge errors

* Lint: remove unnecessary use of sprint

* Fix merge errors

* Fix i18n

Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Этот коммит содержится в:
Rodrigo Villablanca
2020-08-13 11:02:57 -04:00
коммит произвёл GitHub
родитель e8d431ee7c
Коммит 20e44399c7
18 изменённых файлов: 252 добавлений и 173 удалений

Просмотреть файл

@@ -157,8 +157,8 @@ func (worker *Worker) runMigration(key string, lastDone string) (bool, string, *
}
if done {
if saveErr := worker.srv.Store.System().Save(&model.System{Name: key, Value: "true"}); saveErr != nil {
return false, "", saveErr
if nErr := worker.srv.Store.System().Save(&model.System{Name: key, Value: "true"}); nErr != nil {
return false, "", model.NewAppError("runMigration", "migrations.system.save.app_error", nil, nErr.Error(), http.StatusInternalServerError)
}
}