class ShopifyAPIRetry::REST

Constants

HTTP_RETRY_AFTER
HTTP_RETRY_STATUS

Protected Instance Methods

find_handler(error) click to toggle source
Calls superclass method
# File lib/shopify_api_retry.rb, line 147
def find_handler(error)
  handler = super
  return handler if handler || (!error.is_a?(ActiveResource::ConnectionError) || !error.response.respond_to?(:code))

  handler = handlers[error.response.code] || handlers["#{error.response.code[0]}XX"]
  handler[:wait] ||= error.response[HTTP_RETRY_AFTER] || config.default_wait if error.response.code == HTTP_RETRY_STATUS

  handler
end