bing-ads-reporting 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76f0917662f7d55f85fc067d94744e7f33891d71
4
- data.tar.gz: a5583a6ec263e9adf5a4c8b0179b8787dcf3645e
3
+ metadata.gz: b4e8d0fe7973de30dff975c44607935432b1e4e9
4
+ data.tar.gz: b4da0af50e213be19df24d16b44941b3dd1ce466
5
5
  SHA512:
6
- metadata.gz: 609e71a291f1e6018cbfdcf0937a27cb96e538e790384583d85e03162ccb216aba450544b87256cdd2a8fa0c0ed95b0451507f2096d043de345a8ff920956c5c
7
- data.tar.gz: 4a52d0d72a46af3fbecba1e0be47f0028c137034f1ef6f0dd38c6295de2e25eb5c0cb8ad78988c2999412c391e5b95ae99f81d20955a8b360ac6fc6eba4e2229
6
+ metadata.gz: 47d4ea5411fec635f089e5c234cdd412eff110506e1589956fae8242be5ef5a570ae0f79e6df5fbbe34acc40202781b21740d6caee38c7ae80befc210fd2cd46
7
+ data.tar.gz: 382a565cf992292f30380ba760fbd6c45c7a8063c769022159911cc9cf0a4772d342dc80dca29627a10c3ddbebcbc837fdec5e71aee2365f56e9af8c892c1097
@@ -48,9 +48,15 @@ module BingAdsReporting
48
48
  "i:type" => ns("#{report_type}ReportRequest")}
49
49
  }
50
50
  })
51
+
51
52
  rescue Savon::SOAPFault => e
53
+ msg = 'unexpected error'
52
54
  err = e.to_hash[:fault][:detail][:ad_api_fault_detail][:errors][:ad_api_error][:error_code] rescue nil
53
- msg = e.to_hash[:fault][:detail][:ad_api_fault_detail][:errors][:ad_api_error][:message] rescue ''
55
+ msg = e.to_hash[:fault][:detail][:ad_api_fault_detail][:errors][:ad_api_error][:message] if err
56
+ if err.nil?
57
+ err = e.to_hash[:fault][:detail][:api_fault_detail][:operation_errors][:operation_error][:error_code] rescue nil
58
+ msg = e.to_hash[:fault][:detail][:api_fault_detail][:operation_errors][:operation_error][:message] if err
59
+ end
54
60
  if err == 'AuthenticationTokenExpired'
55
61
  @logger.error err
56
62
  raise AuthenticationTokenExpired.new(msg)
@@ -1,3 +1,3 @@
1
1
  module BingAdsReporting
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bing-ads-reporting
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Borkowski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-04 00:00:00.000000000 Z
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: datebox