From 7f9eb91ecc9f35d7ef5162cba844cb49b2187d16 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Fri, 23 Dec 2022 14:53:16 +0100 Subject: [PATCH] Print geolocation errors --- internal/geo/location/response.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/geo/location/response.go b/internal/geo/location/response.go index 6ebc6fa..b926fca 100644 --- a/internal/geo/location/response.go +++ b/internal/geo/location/response.go @@ -3,6 +3,7 @@ package location import ( "encoding/json" "fmt" + "log" "net/http" "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) if err != nil { + log.Println("geo/location error:", locationName) + return errorResponse(fmt.Sprint(err)) }