json - What is the limit exceeded error code or ErrorMessage retrieved as a JSONObject in yahoo api? -
i found error message yahoo api when limit exceeded can tell me return json object , not in xml format?
from geocoder gem
## # yahoo returns errors xml when json format specified. # handle here, without parsing xml # (which add unnecessary complexity). # yahoo auth errors can cryptic, add raw error desc # warning message. # def parse_raw_data(raw_data) if raw_data.match(/^<\?xml/) if raw_data.include?("rate limit exceeded") raise_error(geocoder::overquerylimiterror) || warn("over api query limit.") elsif raw_data =~ /<yahoo:description>(please provide valid credentials.*)<\/yahoo:description>/i raise_error(geocoder::invalidapikey) || warn("invalid api key. error response: #{$1}") end else super(raw_data) end end so seems question cannot answered because not return json response yahoo api. return xml format
Comments
Post a Comment