marlove/react-native-geocoding

how to " Error from the server. The error's 'origin' property contains the response's body."

kommnat opened this issue · 4 comments

Pls Help.

^ having the same issue

Hello, Thanks for reporting this issue, in order to resolve it Please provide us with steps to reproduce it.

Thanks.

ppv94 commented

if we send address in

Geocoder.from("visakhapatnam,andhra pradesh,india")
.then(json => {
var location = json.results[0].geometry.location;
console.log("location",location)
})
.catch(error => console.warn("routeMap Err",error));

i am getting error
{"code": 4, "message": "Error from the server while geocoding. The received datas are in the error's 'origin' field. Check it for more informations.", "origin": {"error_message": "You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started", "results": [], "status": "REQUEST_DENIED"}}

if we send address in

Geocoder.from("visakhapatnam,andhra pradesh,india")
.then(json => {
var location = json.results[0].geometry.location;
console.log("location",location)
})
.catch(error => console.warn("routeMap Err",error));

i am getting error
{"code": 4, "message": "Error from the server while geocoding. The received datas are in the error's 'origin' field. Check it for more informations.", "origin": {"error_message": "You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started", "results": [], "status": "REQUEST_DENIED"}}

@ppv94 This Error response is just forwarding server response which in your case is
"You must enable Billing on the Google Cloud Project"