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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7fe95807761beff04edf5ec80f0ba10971aa5cd3097b063782ff4654f630f778
4
- data.tar.gz: 77226366b5239b8b686fff29496cfc4d95a41a39b831b1ee182a6150e5a5164a
3
+ metadata.gz: b7080648f967007777538332a65481a154e7a29b3041c7e26098396c52d7d9fd
4
+ data.tar.gz: 0c1af658aaa66009efcc447057dc026546fa1f8b0f475a9c6df1e70611e5bcb7
5
5
  SHA512:
6
- metadata.gz: 9cf6ebcbc6aa0419b6a2b475b812e9e899560c107b5dfed1fab279e501277cf5188effc990685fea240b978676963dcd32de8200a48fccf893fcd2cea5e36439
7
- data.tar.gz: 15397232b80c4762a80746c3942df4d1f5e739b416edb85f4ba735bffa99b40b8998dadc1ca8de5edeedb20793510a062ab8bdcbcc0e45edf7f3bd356abd5cf3
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
 
@@ -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
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Laximo
3
3
 
4
- VERSION = '0.9.2.1'.freeze
4
+ VERSION = '0.9.2.2'.freeze
5
5
 
6
6
  end # Laximo
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: laximo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2.1
4
+ version: 0.9.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Pilyaev