MM-28687:Handle empty returns with invalid certificates (#15564)

* add error message for certificate auth issues

* remove hanging '-' if not necessary

* fix linter

* update text, per ux review

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Scott Bishel
2020-09-24 10:17:17 -06:00
коммит произвёл GitHub
родитель a1e17fe78a
Коммит 0916c38290
2 изменённых файлов: 8 добавлений и 2 удалений

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

@@ -5806,6 +5806,10 @@
"id": "ent.ldap.do_login.x509.app_error",
"translation": "Error creating key pair"
},
{
"id": "ent.ldap.no.users.checkcertificate",
"translation": "No LDAP users found, check your user filter and certificates."
},
{
"id": "ent.ldap.save_user.email_exists.ldap_app_error",
"translation": "This account does not use AD/LDAP authentication. Please sign in using email and password."

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

@@ -101,8 +101,10 @@ func (srv *JobServer) SetJobError(job *model.Job, jobError *model.AppError) *mod
if job.Data == nil {
job.Data = make(map[string]string)
}
job.Data["error"] = jobError.Message + " — " + jobError.DetailedError
job.Data["error"] = jobError.Message
if len(jobError.DetailedError) > 0 {
job.Data["error"] += " — " + jobError.DetailedError
}
updated, err := srv.Store.Job().UpdateOptimistically(job, model.JOB_STATUS_IN_PROGRESS)
if err != nil {
return model.NewAppError("SetJobError", "app.job.update.app_error", nil, err.Error(), http.StatusInternalServerError)