class AWS::Errors::Base

Base class for the two service error classes:

When interacting with Amazon AWS services, you will sometimes receive a non-200 level response. These http responses are treated as errors.

Client Errors

Errors in the three and four hundreds are client errors ({ClientError}). A client error should not be resent without changes. The body of the http response (the error message) should give more information about the nature of the problem.

Server Errors

A 500 level error typically indicates the service is having an issue.

Requests that generate service errors are automatically retried with an exponential backoff. If the service still fails to respond with a 200 after 3 retries the error is raised.

Attributes

http_request[R]

@return [Http::Request] The low level http request that caused the

error to be raised.
http_response[R]

@return [Http::Response] The low level http response from the service

that wrapped the service error.

Public Class Methods

new(http_request = nil, http_response = nil, message = nil) click to toggle source
# File lib/aws/errors.rb, line 51
def initialize http_request = nil, http_response = nil, message = nil
  message ||= http_response.body if http_response
  @http_request = http_request
  @http_response = http_response
  super(message)
end