Improved retries

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
2025-05-07 06:37:59 +01:00
parent c29e828d23
commit fa72756aaf
2 changed files with 2 additions and 1 deletions

View File

@@ -110,7 +110,7 @@ func GetLatestBooks() (map[string]*Book, error) {
func getRating(bookID string) string {
resp, err := c.Get(fmt.Sprintf("https://app.thestorygraph.com/books/%s/community_reviews", bookID))
if err != nil {
fmt.Println("Error fetching book rating:", resp.StatusCode)
fmt.Println("Error fetching book rating:", err)
return "0.0"
}
defer resp.Body.Close()