Cleaner error handling for geolocation