Bug in error handling in Shopify::Rest::Base#save #1202
Open
Description
Issue summary
Since v13.0.0 ShopifyAPI::DiscountCode#errors signature has been changed to Hash
, and #errors is initialized as Hash
nil
for DiscountCode
resources.
This causes exception in error handling in ShopifyAPI::Rest::Base#save if ShopifyAPI::Errors::HttpResponseError
is raised during save operation for DiscountCode
resource. Exception is raised because Hash
nil
does not implement #errors
shopify_api
version: 13.1.0- Ruby version: 2.7.7
Expected behavior
Rescuing from ShopifyAPI::Errors::HttpResponseError
does not raise exception
Actual behavior
#<NoMethodError: undefined method `errors' for {}:Hash> is raised
#<NoMethodError: undefined method `errors' for nil:NilClass> is raised
Edit: corrected details
Metadata
Assignees
Labels
No labels