Exception: Aws::AwsError2
- Defined in:
- lib/awsbase/right_awsbase.rb
Overview
Simplified version
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#http_code ⇒ Object
readonly
Response HTTP error code.
-
#request_data ⇒ Object
readonly
Raw request text data to AWS.
-
#request_id ⇒ Object
readonly
Request id (if exists).
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(http_code = nil, request_id = nil, request_data = nil, response = nil) ⇒ AwsError2
constructor
A new instance of AwsError2.
Constructor Details
#initialize(http_code = nil, request_id = nil, request_data = nil, response = nil) ⇒ AwsError2
Returns a new instance of AwsError2.
827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 |
# File 'lib/awsbase/right_awsbase.rb', line 827 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 |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
825 826 827 |
# File 'lib/awsbase/right_awsbase.rb', line 825 def errors @errors end |
#http_code ⇒ Object (readonly)
Response HTTP error code
818 819 820 |
# File 'lib/awsbase/right_awsbase.rb', line 818 def http_code @http_code end |
#request_data ⇒ Object (readonly)
Raw request text data to AWS
821 822 823 |
# File 'lib/awsbase/right_awsbase.rb', line 821 def request_data @request_data end |
#request_id ⇒ Object (readonly)
Request id (if exists)
815 816 817 |
# File 'lib/awsbase/right_awsbase.rb', line 815 def request_id @request_id end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
823 824 825 |
# File 'lib/awsbase/right_awsbase.rb', line 823 def response @response end |