diff --git a/mods/unsplash.go b/mods/unsplash.go index fbe007d..6fa7164 100644 --- a/mods/unsplash.go +++ b/mods/unsplash.go @@ -85,7 +85,7 @@ func unsplash(broker *tg.Broker, update tg.APIMessage) { resp, err := http.Get(unsplashUrl) if err != nil { - log.Println("[unsplash] HTTP request failed: %s\n", err.Error()) + log.Printf("[unsplash] HTTP request failed: %s\nOriginal URL: %s\n", err.Error(), unsplashUrl) broker.SendTextMessage(update.Chat, "ERRORE! @hamcha controlla la console!", &update.MessageID) return } @@ -93,7 +93,7 @@ func unsplash(broker *tg.Broker, update tg.APIMessage) { img, _, err := image.Decode(resp.Body) if err != nil { - log.Println("[unsplash] Image decode error: %s\n", err.Error()) + log.Printf("[unsplash] Image decode error: %s\nOriginal URL: %s\n", err.Error(), unsplashUrl) broker.SendTextMessage(update.Chat, "ERRORE: Non riesco a leggere l'immagine", &update.MessageID) return }