Print geolocation errors

chubin/logging
Igor Chubin 2 years ago
parent ecc9479719
commit 7f9eb91ecc

@ -3,6 +3,7 @@ package location
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"log"
"net/http" "net/http"
"github.com/chubin/wttr.in/internal/routing" "github.com/chubin/wttr.in/internal/routing"
@ -23,6 +24,8 @@ func (c *Cache) Response(r *http.Request) *routing.Cadre {
loc, err = c.Resolve(locationName) loc, err = c.Resolve(locationName)
if err != nil { if err != nil {
log.Println("geo/location error:", locationName)
return errorResponse(fmt.Sprint(err)) return errorResponse(fmt.Sprint(err))
} }

Loading…
Cancel
Save