Skip to content

Commit 5b94da7

Browse files
Add exception for 423 API error code
1 parent 1883e5b commit 5b94da7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/shopify_graphql/client.rb

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ def handle_response(response)
4747
raise PreconditionFailed.new(parsed_body(response), code: response.code)
4848
when 422
4949
raise ResourceInvalid.new(parsed_body(response), code: response.code)
50+
when 423
51+
raise ShopLocked.new(parsed_body(response), code: response.code)
5052
when 429, 430
5153
raise TooManyRequests.new(parsed_body(response), code: response.code)
5254
when 401...500

lib/shopify_graphql/exceptions.rb

+4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ class ResourceGone < ClientError # :nodoc:
6060
class PreconditionFailed < ClientError # :nodoc:
6161
end
6262

63+
# 423 Locked
64+
class ShopLocked < ClientError # :nodoc:
65+
end
66+
6367
# 429 Too Many Requests
6468
class TooManyRequests < ClientError # :nodoc:
6569
end

0 commit comments

Comments
 (0)