[MM-31359] remove duplicated error logs (#16583)
* remove duplicated error logs * reflect review comments * add context * add error details
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
727a158e9a
Коммит
40e16ba07f
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/mattermost/mattermost-server/v5/model"
|
||||
"github.com/mattermost/mattermost-server/v5/services/searchengine"
|
||||
"github.com/mattermost/mattermost-server/v5/store"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type SearchPostStore struct {
|
||||
@@ -136,8 +137,7 @@ func (s SearchPostStore) searchPostsInTeamForUserByEngine(engine searchengine.Se
|
||||
// We only allow the user to search in channels they are a member of.
|
||||
userChannels, err2 := s.rootStore.Channel().GetChannels(teamId, userId, paramsList[0].IncludeDeletedChannels, 0)
|
||||
if err2 != nil {
|
||||
mlog.Error("error getting channel for user", mlog.Err(err2))
|
||||
return nil, err2
|
||||
return nil, errors.Wrap(err2, "error getting channel for user")
|
||||
}
|
||||
|
||||
postIds, matches, err := engine.SearchPosts(userChannels, paramsList, page, perPage)
|
||||
|
||||
Ссылка в новой задаче
Block a user