Skip to content

Commit

Permalink
Fix error logging showed when no error
Browse files Browse the repository at this point in the history
  • Loading branch information
Wikidepia committed Aug 14, 2024
1 parent 53d27b3 commit d1d6855
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion handlers/scraper/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ func (i *InstaData) ScrapeData() error {
}
slog.Error("Failed to scrape data from remote scraper", "postID", i.PostID, "status", res.StatusCode, "err", err)
}
slog.Error("Failed when trying to scrape data from remote scraper", "postID", i.PostID, "err", err)
if err != nil {
slog.Error("Failed when trying to scrape data from remote scraper", "postID", i.PostID, "err", err)
}
}

client := http.Client{Transport: transport, Timeout: timeout}
Expand Down

0 comments on commit d1d6855

Please sign in to comment.