error function for geolocation