class Aws::AwsError2

Simplified version

Attributes

errors[R]
http_code[R]

Response HTTP error code

request_data[R]

Raw request text data to AWS

request_id[R]

Request id (if exists)

response[R]

Public Class Methods

new(http_code=nil, request_id=nil, request_data=nil, response=nil) click to toggle source
# File lib/awsbase/errors.rb, line 103
    def initialize(http_code=nil, request_id=nil, request_data=nil, response=nil)

      @request_id   = request_id
      @http_code    = http_code
      @request_data = request_data
      @response     = response
#            puts '@response=' + @response.inspect

      if @response
        ref = XmlSimple.xml_in(@response, {"ForceArray"=>false})
#                puts "refxml=" + ref.inspect
        msg = "#{ref['Error']['Code']}: #{ref['Error']['Message']}"
      else
        msg = "#{@http_code}: REQUEST(#{@request_data})"
      end
      msg += "\nREQUEST ID=#{@request_id} " unless @request_id.nil?
      super(msg)
    end