Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
fix search query logging user error
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatoleAM committed Dec 12, 2023
1 parent fa0d28c commit aa9b4f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/query/query.search-emotes.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ func (q *Query) SearchEmotes(ctx context.Context, opt SearchEmotesOptions) ([]st

emotes, err := q.Emotes(ctx, bson.M{"_id": bson.M{"$in": emoteIds}}).Items()
if err != nil {
if errors.Compare(err, errors.ErrNoItems()) {
return nil, 0, errors.ErrNoItems().SetDetail("Search returned no results")
}

zap.S().Errorw("mongo, failed to find emotes() gql query",
"error", err,
)
Expand Down

0 comments on commit aa9b4f4

Please sign in to comment.