As per previous discussion in Slack channel, it was requested the creation of a ticket to handle an intermittent issue when trying to access an object available on a bucket.
Here is the snippet:
let headObjectRequest = S3.HeadObjectRequest(bucket: bucket, key: key)
let headObject = s3.headObject(headObjectRequest)
...
The following error is triggered:
Error: dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "x-amz-storage-class", intValue: nil)], debugDescription: "Cannot initialize StorageClass from invalid String value NONE", underlyingError: nil))
How to Reproduce
Pre-conditions:
Have a file uploaded in a bucket
Steps to reproduce the behavior:
Try to retrieve information about the object (s3.headObject)
Observe the behavior
Expected behavior
Retrieve an information about an object should occur without problems.
Setup (please complete the following information):
OS: MacOS and Linux
Version of soto: latest
Additional context
In fact, looking at AWS documentation, StorageClass object is properly defined, however it seems sometimes AWS returns the NONE value in the header x-amz-storage-class.
Here is the quote from AWS documentation:
x-amz-storage-class
Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects.
For more information, see Storage Classes.
Valid Values: STANDARD | REDUCED_REDUNDANCY | STANDARD_IA | ONEZONE_IA | INTELLIGENT_TIERING | GLACIER | DEEP_ARCHIVE | OUTPOSTS | GLACIER_IR
Summary
As per previous discussion in Slack channel, it was requested the creation of a ticket to handle an intermittent issue when trying to access an object available on a bucket.
Here is the snippet:
The following error is triggered:
How to Reproduce
Pre-conditions:
Steps to reproduce the behavior:
Expected behavior Retrieve an information about an object should occur without problems.
Setup (please complete the following information):
Additional context In fact, looking at AWS documentation,
StorageClass
object is properly defined, however it seems sometimes AWS returns the NONE value in the headerx-amz-storage-class
.Here is the quote from AWS documentation: