class Aws::Plugins::RetryErrors::ErrorInspector

@api private

def checksum?

def checksum?
  CHECKSUM_ERRORS.include?(@name) || @error.is_a?(Errors::ChecksumError)
end

def endpoint_discovery?(context)

def endpoint_discovery?(context)
  return false unless context.operation.endpoint_discovery
  if @http_status_code == 421 ||
    extract_name(@error) == 'InvalidEndpointException'
    @error = Errors::EndpointDiscoveryError.new
  end
  # When endpoint discovery error occurs
  # evict the endpoint from cache
  if @error.is_a?(Errors::EndpointDiscoveryError)
    key = context.config.endpoint_cache.extract_key(context)
    context.config.endpoint_cache.delete(key)
    true
  else
    false
  end
end

def expired_credentials?

def expired_credentials?
  !!(EXPIRED_CREDS.include?(@name) || @name.match(/expired/i))
end

def extract_name(error)

def extract_name(error)
  if error.is_a?(Errors::ServiceError)
    error.class.code
  else
    error.class.name.to_s
  end
end

def initialize(error, http_status_code)

def initialize(error, http_status_code)
  @error = error
  @name = extract_name(error)
  @http_status_code = http_status_code
end

def networking?

def networking?
  @error.is_a?(Seahorse::Client::NetworkingError) ||
  NETWORKING_ERRORS.include?(@name)
end

def refreshable_credentials?(context)

def refreshable_credentials?(context)
  context.config.credentials.respond_to?(:refresh!)
end

def retryable?(context)

def retryable?(context)
  (expired_credentials? and refreshable_credentials?(context)) or
    throttling_error? or
    checksum? or
    networking? or
    server? or
    endpoint_discovery?(context)
end

def server?

def server?
  (500..599).include?(@http_status_code)
end

def throttling_error?

def throttling_error?
  !!(THROTTLING_ERRORS.include?(@name) || @name.match(/throttl/i) || @http_status_code == 429)
end