class Aws::Plugins::RetryErrors::ErrorInspector
@api private
Constants
- CHECKSUM_ERRORS
- EXPIRED_CREDS
- NETWORKING_ERRORS
- THROTTLING_ERRORS
Public Class Methods
new(error, http_status_code)
click to toggle source
# File lib/aws-sdk-core/plugins/retry_errors.rb, line 45 def initialize(error, http_status_code) @error = error @name = extract_name(error) @http_status_code = http_status_code end
Public Instance Methods
checksum?()
click to toggle source
# File lib/aws-sdk-core/plugins/retry_errors.rb, line 59 def checksum? CHECKSUM_ERRORS.include?(@name) || @error.is_a?(Errors::ChecksumError) end
expired_credentials?()
click to toggle source
# File lib/aws-sdk-core/plugins/retry_errors.rb, line 51 def expired_credentials? !!(EXPIRED_CREDS.include?(@name) || @name.match(/expired/i)) end
networking?()
click to toggle source
# File lib/aws-sdk-core/plugins/retry_errors.rb, line 63 def networking? @error.is_a?(Seahorse::Client::NetworkingError) || NETWORKING_ERRORS.include?(@name) || @http_status_code == 0 end
server?()
click to toggle source
# File lib/aws-sdk-core/plugins/retry_errors.rb, line 69 def server? (500..599).include?(@http_status_code) end
throttling_error?()
click to toggle source
# File lib/aws-sdk-core/plugins/retry_errors.rb, line 55 def throttling_error? !!(THROTTLING_ERRORS.include?(@name) || @name.match(/throttl/i)) end
Private Instance Methods
extract_name(error)
click to toggle source
# 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