shopify_graphql 1.2.5 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shopify_graphql/client.rb +9 -1
- data/lib/shopify_graphql/exceptions.rb +4 -0
- data/lib/shopify_graphql/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: 2665c3ed8b5b9d23122eea1f5b2aa732e498c121b84e8107d8a38fa72f283194
|
4
|
+
data.tar.gz: 9c9419934d87bbbc83466062979645be6747567425c3ef00a544f106e77b086f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5ea8982a3f9ab9886da4999e56f6de96b86393866b802ccda7d0b8203799dc3679dfb7ce1705b036bc67fa77e41315ab00e40804b728bd369933845c85ddc59
|
7
|
+
data.tar.gz: 20e14ad87d2de46ce703ba1787dfe3ce2ecf7ec04e27c6f330d02eb2aee3b4d01c1d725690747a6aa5c6d784520246af9e92d186ff131a31eaabf9e7a4864104
|
@@ -11,8 +11,14 @@ module ShopifyGraphql
|
|
11
11
|
Response.new(handle_response(e.response))
|
12
12
|
rescue JSON::ParserError => e
|
13
13
|
raise ServerError.new(e, "Invalid JSON response")
|
14
|
-
rescue Errno::ECONNRESET, Errno::EPIPE, Errno::ECONNREFUSED, Errno::ENETUNREACH, Net::ReadTimeout, Net::OpenTimeout, OpenSSL::SSL::SSLError, EOFError
|
14
|
+
rescue Errno::ECONNRESET, Errno::EPIPE, Errno::ECONNREFUSED, Errno::ENETUNREACH, Net::ReadTimeout, Net::OpenTimeout, OpenSSL::SSL::SSLError, EOFError => e
|
15
15
|
raise ServerError.new(e, "Network error")
|
16
|
+
rescue => e
|
17
|
+
if (defined?(Socket::ResolutionError) and e.is_a?(Socket::ResolutionError))
|
18
|
+
raise ServerError.new(response: response), "Network error: #{e.message}"
|
19
|
+
else
|
20
|
+
raise e
|
21
|
+
end
|
16
22
|
end
|
17
23
|
|
18
24
|
def parsed_body(response)
|
@@ -47,6 +53,8 @@ module ShopifyGraphql
|
|
47
53
|
raise PreconditionFailed.new(parsed_body(response), code: response.code)
|
48
54
|
when 422
|
49
55
|
raise ResourceInvalid.new(parsed_body(response), code: response.code)
|
56
|
+
when 423
|
57
|
+
raise ShopLocked.new(parsed_body(response), code: response.code)
|
50
58
|
when 429, 430
|
51
59
|
raise TooManyRequests.new(parsed_body(response), code: response.code)
|
52
60
|
when 401...500
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirill Platonov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|