@api private
# File lib/aws-sdk-core/plugins/retry_errors.rb, line 46 def initialize(error, http_status_code) @error = error @name = extract_name(error) @http_status_code = http_status_code end
# File lib/aws-sdk-core/plugins/retry_errors.rb, line 60 def checksum? CHECKSUM_ERRORS.include?(@name) || @error.is_a?(Errors::ChecksumError) end
# File lib/aws-sdk-core/plugins/retry_errors.rb, line 52 def expired_credentials? !!(EXPIRED_CREDS.include?(@name) || @name.match(/expired/)) end
# File lib/aws-sdk-core/plugins/retry_errors.rb, line 64 def networking? @error.is_a?(Seahorse::Client::NetworkingError) || NETWORKING_ERRORS.include?(@name) end
# File lib/aws-sdk-core/plugins/retry_errors.rb, line 69 def server? (500..599).include?(@http_status_code) end
# File lib/aws-sdk-core/plugins/retry_errors.rb, line 56 def throttling_error? !!(THROTTLING_ERRORS.include?(@name) || @name.match(/throttl/)) end
# File lib/aws-sdk-core/plugins/retry_errors.rb, line 75 def extract_name(error) if error.is_a?(Errors::ServiceError) error.class.code else error.class.name.to_s end end