-
Notifications
You must be signed in to change notification settings - Fork 224
Open
Labels
help wantedWe'd love to have community involvement on this issue.We'd love to have community involvement on this issue.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Call to nearby roads API does not give same error about not having billing setup as the geocoding API does.
Steps to reproduce
- Create a basic project requesting snap to roads
- Use API key associated with project that does not have billing enabled.
- Issue request
One will get an empty response but no error. The geocoding API does return an error stating that billing must be enabled.
Code example
c, err := maps.NewClient(maps.WithAPIKey(os.Getenv("GOOGLE_MAPS_API_KEY")))
if err != nil {
log.Fatalf("fatal error: %s", err)
}
r := maps.NearestRoadsRequest{Points: utils.GeoPointsToGmapLatLngs(geoPoints)}
resp, err := c.NearestRoads(context.Background(), &r)
if err != nil {
log.Fatalf("fatal error: %s", err)
}
pretty.Println(resp.SnappedPoints)
Stack trace
None
Metadata
Metadata
Assignees
Labels
help wantedWe'd love to have community involvement on this issue.We'd love to have community involvement on this issue.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.