Skip to content

Commit

Permalink
Clarify post not found logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Wikidepia committed Jan 25, 2024
1 parent a4bd6b6 commit 3b282ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion handlers/data/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (i *InstaData) GetData(postID string) error {
if err != ErrNotFound {
log.Error().Str("postID", postID).Err(err).Msg("Failed to get data from Instagram")
} else {
log.Warn().Str("postID", postID).Err(err).Msg("Post not found")
log.Warn().Str("postID", postID).Err(err).Msg("Post not found; err getData")
}
return err
}
Expand Down
2 changes: 1 addition & 1 deletion handlers/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func Embed() fiber.Handler {
views.Embed(viewsData, viewsBuf)
return c.Send(viewsBuf.Bytes())
} else if len(item.Username) == 0 {
log.Warn().Str("postID", postID).Msg("Post not found")
log.Warn().Str("postID", postID).Msg("Post not found; empty username")
viewsData.Description = "Post not found"
views.Embed(viewsData, viewsBuf)
return c.Send(viewsBuf.Bytes())
Expand Down

0 comments on commit 3b282ec

Please sign in to comment.