aws 1.11.5 → 1.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/awsbase/right_awsbase.rb +12 -4
- data/lib/right_aws.rb +1 -1
- metadata +1 -1
@@ -329,7 +329,8 @@ module RightAws
|
|
329
329
|
@error_handler = nil
|
330
330
|
return check_result
|
331
331
|
end
|
332
|
-
|
332
|
+
request_text_data = "#{request[:server]}:#{request[:port]}#{request[:request].path}"
|
333
|
+
raise AwsError.new(@last_errors, @last_response.code, @last_request_id, request_text_data)
|
333
334
|
end
|
334
335
|
rescue Exception => e
|
335
336
|
blockexception = e
|
@@ -361,7 +362,8 @@ module RightAws
|
|
361
362
|
@error_handler = nil
|
362
363
|
return check_result
|
363
364
|
end
|
364
|
-
|
365
|
+
request_text_data = "#{request[:server]}:#{request[:port]}#{request[:request].path}"
|
366
|
+
raise AwsError.new(@last_errors, @last_response.code, @last_request_id, request_text_data)
|
365
367
|
end
|
366
368
|
end
|
367
369
|
rescue
|
@@ -408,12 +410,18 @@ module RightAws
|
|
408
410
|
|
409
411
|
# Response HTTP error code
|
410
412
|
attr_reader :http_code
|
413
|
+
|
414
|
+
# The request URL and input values
|
415
|
+
attr_reader :request_data
|
411
416
|
|
412
|
-
def initialize(errors=nil, http_code=nil, request_id=nil)
|
417
|
+
def initialize(errors=nil, http_code=nil, request_id=nil, request_data=nil)
|
413
418
|
@errors = errors
|
414
419
|
@request_id = request_id
|
415
420
|
@http_code = http_code
|
416
|
-
|
421
|
+
@request_data = request_data
|
422
|
+
msg = @errors.is_a?(Array) ? @errors.map{|code, msg| "#{code}: #{msg}"}.join("; ") : @errors.to_s
|
423
|
+
msg += "\nREQUEST(#{@request_data})" unless @request_data.nil?
|
424
|
+
super(msg)
|
417
425
|
end
|
418
426
|
|
419
427
|
# Does any of the error messages include the regexp +pattern+?
|
data/lib/right_aws.rb
CHANGED