Class: Aws::Plugins::RetryErrors::ErrorInspector Private
- Inherits:
-
Object
- Object
- Aws::Plugins::RetryErrors::ErrorInspector
- Defined in:
- lib/aws-sdk-core/plugins/retry_errors.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- EXPIRED_CREDS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Set.new([ 'InvalidClientTokenId', # query services 'UnrecognizedClientException', # json services 'InvalidAccessKeyId', # s3 'AuthFailure', # ec2 ])
- THROTTLING_ERRORS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Set.new([ 'Throttling', # query services 'ThrottlingException', # json services 'RequestThrottled', # sqs 'ProvisionedThroughputExceededException', # dynamodb 'RequestLimitExceeded', # ec2 'BandwidthLimitExceeded', # cloud search 'LimitExceededException', # kinesis 'TooManyRequestsException', # batch ])
- CHECKSUM_ERRORS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Set.new([ 'CRC32CheckFailed', # dynamodb ])
- NETWORKING_ERRORS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Set.new([ 'RequestTimeout', # s3 ])
Instance Method Summary collapse
- #checksum? ⇒ Boolean private
- #expired_credentials? ⇒ Boolean private
-
#initialize(error, http_status_code) ⇒ ErrorInspector
constructor
private
A new instance of ErrorInspector.
- #networking? ⇒ Boolean private
- #server? ⇒ Boolean private
- #throttling_error? ⇒ Boolean private
Constructor Details
#initialize(error, http_status_code) ⇒ ErrorInspector
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ErrorInspector.
47 48 49 50 51 |
# File 'lib/aws-sdk-core/plugins/retry_errors.rb', line 47 def initialize(error, http_status_code) @error = error @name = extract_name(error) @http_status_code = http_status_code end |
Instance Method Details
#checksum? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
61 62 63 |
# File 'lib/aws-sdk-core/plugins/retry_errors.rb', line 61 def checksum? CHECKSUM_ERRORS.include?(@name) || @error.is_a?(Errors::ChecksumError) end |
#expired_credentials? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
53 54 55 |
# File 'lib/aws-sdk-core/plugins/retry_errors.rb', line 53 def expired_credentials? !!(EXPIRED_CREDS.include?(@name) || @name.match(/expired/i)) end |
#networking? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
65 66 67 68 |
# File 'lib/aws-sdk-core/plugins/retry_errors.rb', line 65 def networking? @error.is_a?(Seahorse::Client::NetworkingError) || NETWORKING_ERRORS.include?(@name) end |
#server? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
70 71 72 |
# File 'lib/aws-sdk-core/plugins/retry_errors.rb', line 70 def server? (500..599).include?(@http_status_code) end |
#throttling_error? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
57 58 59 |
# File 'lib/aws-sdk-core/plugins/retry_errors.rb', line 57 def throttling_error? !!(THROTTLING_ERRORS.include?(@name) || @name.match(/throttl/i)) end |