From 3b282ecad9ba009c1267d23dd5de69c2d66cdb1c Mon Sep 17 00:00:00 2001 From: Akmal Date: Thu, 25 Jan 2024 14:59:36 +0700 Subject: [PATCH] Clarify post not found logging --- handlers/data/data.go | 2 +- handlers/embed.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handlers/data/data.go b/handlers/data/data.go index 6b24cbf..f9156c0 100644 --- a/handlers/data/data.go +++ b/handlers/data/data.go @@ -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 } diff --git a/handlers/embed.go b/handlers/embed.go index ab487ca..2dc3c04 100644 --- a/handlers/embed.go +++ b/handlers/embed.go @@ -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())