mirror of
https://github.com/chubin/wttr.in
synced 2025-01-11 19:48:45 +00:00
Print geolocation errors
This commit is contained in:
parent
ecc9479719
commit
7f9eb91ecc
1 changed files with 3 additions and 0 deletions
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue