zuora_api 1.11.6 → 1.11.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zuora_api/login.rb +14 -6
- data/lib/zuora_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38e28f2bd7870815c491123e4802f8b88db525ecf65264ea8d4e9dd20f502800
|
4
|
+
data.tar.gz: da319cc2164cbd486f31e726877199a445dcad0311c25b220e139119d6163c8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9181450aead9432c27611750f205042329f3ad2dee61f79d1bb2c0743e3ffb19898c705216392511b90aa115780f6fb3726d63e180df64104b800b0c13a563b
|
7
|
+
data.tar.gz: e9e578de9dd6be5916c35cbed90f436d4875714ee0b7bad11431a95bae3522c0f74eee53d820cdd33b09929b2cf297225e6484af998d51f201b28313c822bfea
|
data/lib/zuora_api/login.rb
CHANGED
@@ -13,12 +13,13 @@ module ZuoraAPI
|
|
13
13
|
|
14
14
|
CONNECTION_EXCEPTIONS = [
|
15
15
|
Net::OpenTimeout,
|
16
|
-
OpenSSL::SSL::SSLError,
|
17
|
-
Errno::ECONNREFUSED,
|
18
16
|
SocketError,
|
19
|
-
|
17
|
+
OpenSSL::SSL::SSLError,
|
18
|
+
Errno::ECONNREFUSED, #A remote host refused to allow the network connection
|
19
|
+
Errno::EINVAL, #Invalid argument. This is used to indicate various kinds of problems with passing the wrong argument to a library function.
|
20
|
+
Errno::EHOSTUNREACH, #The remote host for a requested network connection is not reachable.
|
20
21
|
Errno::EADDRNOTAVAIL,
|
21
|
-
Errno::ETIMEDOUT,
|
22
|
+
Errno::ETIMEDOUT, #ETIMEDOUT A socket operation with a specified timeout received no response during the timeout period.
|
22
23
|
].freeze
|
23
24
|
|
24
25
|
CONNECTION_READ_EXCEPTIONS = [
|
@@ -668,6 +669,8 @@ module ZuoraAPI
|
|
668
669
|
if new_message.present?
|
669
670
|
if new_message.include?("The query exceeded maximum processing time")
|
670
671
|
error, message = ['TRANSACTION_FAILED', new_message.concat(" Please see KC for the Max Timeout Specification https://community.zuora.com/t5/Release-Notifications/Upcoming-Change-for-AQuA-and-Data-Source-Export-January-2021/ba-p/35024")]
|
672
|
+
elsif new_message.include?("There is no field named")
|
673
|
+
error, message = ['TRANSACTION_FAILED', new_message]
|
671
674
|
else
|
672
675
|
error, message = ['UNEXPECTED_ERROR', new_message]
|
673
676
|
end
|
@@ -873,6 +876,11 @@ module ZuoraAPI
|
|
873
876
|
end
|
874
877
|
|
875
878
|
if body.class == Hash && body['message'].present?
|
879
|
+
|
880
|
+
if body['message'] && body['code'].present?
|
881
|
+
raise_errors_helper(error: body['code'], message: body['message'], raise_final: false)
|
882
|
+
end
|
883
|
+
|
876
884
|
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(body['message'], response) if response.code == 500
|
877
885
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(body['message'], response) if ![200,201,202].include?(response.code)
|
878
886
|
end
|
@@ -962,7 +970,7 @@ module ZuoraAPI
|
|
962
970
|
return error, success, message
|
963
971
|
end
|
964
972
|
|
965
|
-
def raise_errors_helper(error: nil, message: nil, response: nil, errors: [], success: [])
|
973
|
+
def raise_errors_helper(error: nil, message: nil, response: nil, errors: [], success: [], raise_final: true)
|
966
974
|
case error
|
967
975
|
when /.*INVALID_SESSION/
|
968
976
|
raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new(message, response, errors, success)
|
@@ -1006,7 +1014,7 @@ module ZuoraAPI
|
|
1006
1014
|
end
|
1007
1015
|
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(message, response, errors, success)
|
1008
1016
|
else
|
1009
|
-
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new("Z:#{error}::#{message}", response, errors, success)
|
1017
|
+
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new("Z:#{error}::#{message}", response, errors, success) if raise_final
|
1010
1018
|
end
|
1011
1019
|
end
|
1012
1020
|
|
data/lib/zuora_api/version.rb
CHANGED
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.
|
4
|
+
version: 1.11.8
|
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-
|
11
|
+
date: 2023-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|