laximo 0.9.2.1 → 0.9.2.2
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/laximo/errors.rb +6 -1
- data/lib/laximo/respond.rb +4 -1
- data/lib/laximo/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: b7080648f967007777538332a65481a154e7a29b3041c7e26098396c52d7d9fd
|
|
4
|
+
data.tar.gz: 0c1af658aaa66009efcc447057dc026546fa1f8b0f475a9c6df1e70611e5bcb7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd95fef731a31b7b6914b6f5bcf9324331bddc6a72a0093a7132dacd5499f6a3e3431b808bfeb4ce7a26babf847178b74fd74c74fb78fd6703fa0be7d1ce1566
|
|
7
|
+
data.tar.gz: cd4ee6fbef0716c167c38fd7919c98a5905f253852dd9ea7c69ff2c6434c0805408ef5ce445bc0e38b14a260b16711176787228b2e370e141efbbb4d37fe101e
|
data/lib/laximo/errors.rb
CHANGED
|
@@ -23,6 +23,10 @@ module Laximo
|
|
|
23
23
|
|
|
24
24
|
class SoapTooManyRequestError < ::Laximo::Error; end
|
|
25
25
|
|
|
26
|
+
class SoapUnexpectedError < ::Laximo::Error; end
|
|
27
|
+
|
|
28
|
+
class SoapEmptyResponseError < ::Laximo::Error; end
|
|
29
|
+
|
|
26
30
|
ERRORS = {
|
|
27
31
|
|
|
28
32
|
'E_CATALOGNOTEXISTS' => SoapCatalogNotExistsError,
|
|
@@ -32,7 +36,8 @@ module Laximo
|
|
|
32
36
|
'E_ACCESSDENIED' => SoapAccessDeniedError,
|
|
33
37
|
'E_NOTSUPPORTED' => SoapNotSupportedError,
|
|
34
38
|
'E_GROUP_IS_NOT_SEARCHABLE' => SoapGroupIsNotSearchableError,
|
|
35
|
-
'E_TOO_MANY_REQUESTS' => SoapTooManyRequestError
|
|
39
|
+
'E_TOO_MANY_REQUESTS' => SoapTooManyRequestError,
|
|
40
|
+
'E_UNEXPECTED_PROBLEM' => SoapUnexpectedError
|
|
36
41
|
|
|
37
42
|
}.freeze
|
|
38
43
|
|
data/lib/laximo/respond.rb
CHANGED
|
@@ -147,6 +147,9 @@ module Laximo
|
|
|
147
147
|
::Nokogiri::XML(unescape(res))
|
|
148
148
|
) || []
|
|
149
149
|
|
|
150
|
+
return @result unless @result.empty?
|
|
151
|
+
@error = ::Laximo::SoapEmptyResponseError.new('Empty response')
|
|
152
|
+
|
|
150
153
|
rescue ::Exception => ex
|
|
151
154
|
|
|
152
155
|
@result = []
|
|
@@ -160,7 +163,7 @@ module Laximo
|
|
|
160
163
|
|
|
161
164
|
err_name, msg = err_txt.split(':')
|
|
162
165
|
|
|
163
|
-
err_cls = Laximo::ERRORS[err_name] || ::Laximo::SoapError
|
|
166
|
+
err_cls = ::Laximo::ERRORS[err_name] || ::Laximo::SoapError
|
|
164
167
|
err_cls.new(msg)
|
|
165
168
|
|
|
166
169
|
end # soap_errors
|
data/lib/laximo/version.rb
CHANGED