-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ShopifyAPI::Clients::HttpResponse as argument for ShopifyAPI::Errors::HttpResponseError #1040
Changes from all commits
f6c6efc
053d9db
a98cef3
285adc7
533ec79
54be246
072f2fa
5cfe410
c83bf0d
86cef63
df0b31d
ae254a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,14 @@ class HttpResponseError < StandardError | |
sig { returns(Integer) } | ||
attr_reader :code | ||
|
||
sig { params(code: Integer).void } | ||
def initialize(code:) | ||
sig { returns(ShopifyAPI::Clients::HttpResponse) } | ||
attr_reader :response | ||
|
||
sig { params(response: ShopifyAPI::Clients::HttpResponse).void } | ||
def initialize(response:) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This idea makes sense to provide the response instead of just the code! I do think if we add the required keyword of MaxHttpRetriesExceededError which inherits from this class. We'll need to update any instantiations of this error to reflect this keyword change otherwise we'll see an |
||
super | ||
@code = code | ||
@code = T.let(response.code, Integer) | ||
@response = response | ||
end | ||
end | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nelsonwittwer. Thank you for your comment. Do you mean this place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added assertion for that - 3312bc0