lib/adwords_api/report_utils.rb
# Checks for an XML error in the response body and raises an exception if
# it was found.
Checks for an XML error in the response body and raises an exception if
it was found.
Checks for an XML error in the response body and raises an exception if it was found .
def check_for_xml_error(report_body, response_code)
      error_response = Nori.parse(report_body)
      if error_response.include?(:report_download_error) and
          error_response[:report_download_error].include?(:api_error)
        api_error = error_response[:report_download_error][:api_error]
        raise AdwordsApi::Errors::ReportXmlError.new(response_code,
            api_error[:type], api_error[:trigger], api_error[:field_path])
      end
    end
def check_for_xml_error ( report_body , response_code ) error_response = Nori . parse ( report_body ) if error_response . include? ( :report_download_error ) and error_response [ :report_download_error ] . include? ( :api_error ) api_error = error_response [ :report_download_error ] [ :api_error ] raise AdwordsApi :: Errors :: ReportXmlError . new ( response_code , api_error [ :type ] , api_error [ :trigger ] , api_error [ :field_path ] ) end end
Checks for an XML error in the response body and raises an exception if
it was found.
Checks for an XML error in the response body and raises an exception if it was found .
report_body
<not_specific>
response_code
<not_specific>