zuora_api 1.11.7 → 1.11.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/zuora_api/login.rb +7 -2
- data/lib/zuora_api/version.rb +1 -1
- metadata +1 -1
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
@@ -876,6 +876,11 @@ module ZuoraAPI
|
|
876
876
|
end
|
877
877
|
|
878
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
|
+
|
879
884
|
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(body['message'], response) if response.code == 500
|
880
885
|
raise ZuoraAPI::Exceptions::ZuoraAPIError.new(body['message'], response) if ![200,201,202].include?(response.code)
|
881
886
|
end
|
@@ -965,7 +970,7 @@ module ZuoraAPI
|
|
965
970
|
return error, success, message
|
966
971
|
end
|
967
972
|
|
968
|
-
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)
|
969
974
|
case error
|
970
975
|
when /.*INVALID_SESSION/
|
971
976
|
raise ZuoraAPI::Exceptions::ZuoraAPISessionError.new(message, response, errors, success)
|
@@ -1009,7 +1014,7 @@ module ZuoraAPI
|
|
1009
1014
|
end
|
1010
1015
|
raise ZuoraAPI::Exceptions::ZuoraAPIInternalServerError.new(message, response, errors, success)
|
1011
1016
|
else
|
1012
|
-
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
|
1013
1018
|
end
|
1014
1019
|
end
|
1015
1020
|
|
data/lib/zuora_api/version.rb
CHANGED