zuora_api 1.11.8 → 1.11.9

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
  SHA256:
3
- metadata.gz: 38e28f2bd7870815c491123e4802f8b88db525ecf65264ea8d4e9dd20f502800
4
- data.tar.gz: da319cc2164cbd486f31e726877199a445dcad0311c25b220e139119d6163c8b
3
+ metadata.gz: 32591a1ee931c290b8e4f8db9f5c9b6531f5e11bff393eb1f7789b78be231ae6
4
+ data.tar.gz: adc6e839f47d670cc3cd7b30f491fd418dd12b8d4342319ccfb6ace47ebf6558
5
5
  SHA512:
6
- metadata.gz: e9181450aead9432c27611750f205042329f3ad2dee61f79d1bb2c0743e3ffb19898c705216392511b90aa115780f6fb3726d63e180df64104b800b0c13a563b
7
- data.tar.gz: e9e578de9dd6be5916c35cbed90f436d4875714ee0b7bad11431a95bae3522c0f74eee53d820cdd33b09929b2cf297225e6484af998d51f201b28313c822bfea
6
+ metadata.gz: 0bc7ebeee44e9775250989c6a53af10a95b7d4c908e7a1c3c613d6f2c89f3a5e06c922dbf5623c8d1540b89579c229878dc3be7c65016294637d2fa5d39e9669
7
+ data.tar.gz: 55c77daad5f115fa7cdc1504e5dc89bca7f0643a8b4879927edec974cfc2d3a5879fd237245cd3f18c3cbd83ef05cdab9f6b47fbe889e45ae602d59faee1d3df
@@ -854,7 +854,7 @@ module ZuoraAPI
854
854
  end
855
855
 
856
856
  #Zuora REST Actions error (Create, Update, Delete, Amend)
857
- if body.class == Array
857
+ if body.class == Array && !body.compact.blank?
858
858
  all_errors = body.select {|obj| !obj['Success'] || !obj['success'] }.map {|obj| obj['Errors'] || obj['errors'] }.compact
859
859
  all_success = body.select {|obj| obj['Success'] || obj['success']}.compact
860
860
 
@@ -888,7 +888,12 @@ module ZuoraAPI
888
888
  self.errors_via_content_type(response: response, type: :json)
889
889
 
890
890
  #All other errors
891
- raise ZuoraAPI::Exceptions::ZuoraAPIError.new(response.body, response) if ![200,201,202].include?(response.code)
891
+ if ![200,201,202].include?(response.code)
892
+ if body == [nil]
893
+ raise ZuoraAPI::Exceptions::ZuoraAPIError.new('No error message. Invalid API request', response)
894
+ end
895
+ raise ZuoraAPI::Exceptions::ZuoraAPIError.new(response.body, response)
896
+ end
892
897
  end
893
898
  end
894
899
 
@@ -1,3 +1,3 @@
1
1
  module ZuoraAPI
2
- VERSION = "1.11.8"
2
+ VERSION = "1.11.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.8
4
+ version: 1.11.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zuora Strategic Solutions Group
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-07 00:00:00.000000000 Z
11
+ date: 2023-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler