Fix logging in unsplash
This commit is contained in:
parent
6db07308bf
commit
8b8228c0f9
1 changed files with 2 additions and 2 deletions
|
@ -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, "<b>ERRORE!</b> @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, "<b>ERRORE</b>: Non riesco a leggere l'immagine", &update.MessageID)
|
||||
return
|
||||
}
|
||||
|
|
Reference in a new issue