From 124e729c007dac6e505c1bbc32e53014a3b10b53 Mon Sep 17 00:00:00 2001 From: Prashant Vithani Date: Mon, 4 Mar 2019 14:14:27 +0530 Subject: [PATCH] Handle the case when the url is nil for no data from bing --- lib/bing/ads/api/v12/services/reporting.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/bing/ads/api/v12/services/reporting.rb b/lib/bing/ads/api/v12/services/reporting.rb index a34a5c5..555c7ea 100644 --- a/lib/bing/ads/api/v12/services/reporting.rb +++ b/lib/bing/ads/api/v12/services/reporting.rb @@ -35,6 +35,9 @@ def report_url(report_request_id) end def report_body(report_request_id) + report_url = report_url(report_request_id) + return if report_url.nil? + HttpClient.download(report_url(report_request_id)) end