class Aws::Plugins::Retries::ErrorInspector
This class will be obsolete when APIs contain modeled exceptions
@api private
def checksum?
def checksum? CHECKSUM_ERRORS.include?(@name) end
def clock_skew?(context)
def clock_skew?(context) CLOCK_SKEW_ERRORS.include?(@name) && context.config.clock_skew.clock_skewed?(context) end
def endpoint_discovery?(context)
def endpoint_discovery?(context) return false unless context.operation.endpoint_discovery @http_status_code == 421 || @name == 'InvalidEndpointException' || @error.is_a?(Errors::EndpointDiscoveryError) 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 || error.class.name.to_s 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 modeled_retryable?
def modeled_retryable? @error.is_a?(Errors::ServiceError) && @error.retryable? end
def modeled_throttling?
def modeled_throttling? @error.is_a?(Errors::ServiceError) && @error.throttling? end
def networking?
def networking? @error.is_a?(Seahorse::Client::NetworkingError) || @error.is_a?(Errors::NoSuchEndpointError) || 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) server? || modeled_retryable? || throttling_error? || networking? || checksum? || endpoint_discovery?(context) || (expired_credentials? && refreshable_credentials?(context)) || clock_skew?(context) end
def server?
def server? (500..599).cover?(@http_status_code) end
def throttling_error?
def throttling_error? !!(THROTTLING_ERRORS.include?(@name) || @name.match(/throttl/i) || @http_status_code == 429) || modeled_throttling? end