MM-45991 Wrap errors (#20785)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8e0d46e0c6
Коммит
a28a967eba
@@ -820,7 +820,7 @@ func (es *Service) SendMailWithEmbeddedFiles(to, subject, htmlBody string, embed
|
||||
func (es *Service) InvalidateVerifyEmailTokensForUser(userID string) *model.AppError {
|
||||
tokens, err := es.store.Token().GetAllTokensByType(TokenTypeVerifyEmail)
|
||||
if err != nil {
|
||||
return model.NewAppError("InvalidateVerifyEmailTokensForUser", "api.user.invalidate_verify_email_tokens.error", nil, err.Error(), http.StatusInternalServerError)
|
||||
return model.NewAppError("InvalidateVerifyEmailTokensForUser", "api.user.invalidate_verify_email_tokens.error", nil, "", http.StatusInternalServerError).Wrap(err)
|
||||
}
|
||||
|
||||
var appErr *model.AppError = nil
|
||||
@@ -830,7 +830,7 @@ func (es *Service) InvalidateVerifyEmailTokensForUser(userID string) *model.AppE
|
||||
Email string
|
||||
}{}
|
||||
if err := json.Unmarshal([]byte(token.Extra), &tokenExtra); err != nil {
|
||||
appErr = model.NewAppError("InvalidateVerifyEmailTokensForUser", "api.user.invalidate_verify_email_tokens_parse.error", nil, err.Error(), http.StatusInternalServerError)
|
||||
appErr = model.NewAppError("InvalidateVerifyEmailTokensForUser", "api.user.invalidate_verify_email_tokens_parse.error", nil, "", http.StatusInternalServerError).Wrap(err)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -839,7 +839,7 @@ func (es *Service) InvalidateVerifyEmailTokensForUser(userID string) *model.AppE
|
||||
}
|
||||
|
||||
if err := es.store.Token().Delete(token.Token); err != nil {
|
||||
appErr = model.NewAppError("InvalidateVerifyEmailTokensForUser", "api.user.invalidate_verify_email_tokens_delete.error", nil, err.Error(), http.StatusInternalServerError)
|
||||
appErr = model.NewAppError("InvalidateVerifyEmailTokensForUser", "api.user.invalidate_verify_email_tokens_delete.error", nil, "", http.StatusInternalServerError).Wrap(err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user