Skip to content

Commit

Permalink
fix: magic msg out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
liaosunny123 committed Sep 2, 2023
1 parent 5f4b1d7 commit ed176ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/message/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ func sendMagicMessage() {
logger.WithFields(logrus.Fields{
"UserId": friend.Id,
"Err": err,
}).Errorf("Cannot get recommend video of user %d", friend.Id)
}).Errorf("Cannot get recommend video of user")
logging.SetSpanError(span, err)
continue
}
Expand All @@ -476,7 +476,7 @@ func sendMagicMessage() {
ActorId: config.EnvCfg.MagicUserId,
VideoIds: []uint32{videoId},
})
if err != nil {
if err != nil || len(videoQueryResponse.VideoList) < 1 {
logger.WithFields(logrus.Fields{
"UserId": friend.Id,
"VideoId": videoId,
Expand Down

0 comments on commit ed176ec

Please sign in to comment.