add error handling of foursquare api