Class: Aws::S3::Errors::Http301Error
- Inherits:
-
ServiceError
- Object
- ServiceError
- Aws::S3::Errors::Http301Error
- Defined in:
- lib/aws-sdk-s3/customizations/errors.rb
Overview
Hijack PermanentRedirect (HeadBucket case - no body) dynamic error to include the region.
Instance Method Summary collapse
-
#initialize(context, message, _data = Aws::EmptyStructure.new) ⇒ Http301Error
constructor
A new instance of Http301Error.
Constructor Details
#initialize(context, message, _data = Aws::EmptyStructure.new) ⇒ Http301Error
Returns a new instance of Http301Error.
32 33 34 35 36 |
# File 'lib/aws-sdk-s3/customizations/errors.rb', line 32 def initialize(context, , _data = Aws::EmptyStructure.new) data = Aws::S3::Types::PermanentRedirect.new(message: ) data.region = context.http_response.headers['x-amz-bucket-region'] super(context, , data) end |