-
-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I'm having a bit of trouble with using the ListObjectsV2Input
struct. The optional_object_attributes
field is not an Option
at the moment, so the natural thing to do is to use Vec::new()
. However, the S3 API return a 400 if this header is specified but empty:
<Error><Code>InvalidArgument</Code><Message>Invalid attribute name specified.</Message><ArgumentName>x-amz-optional-object-attributes</ArgumentName><ArgumentValue></ArgumentValue>
My workaround is to just add something inside that I don't actually need:
req.input.optional_object_attributes = vec![
OptionalObjectAttributes::from_static(OptionalObjectAttributes::RESTORE_STATUS)
];
This allows the request to go through, but it would be nicer to make this field Option
so we can set it to None
and omit the header in the request.
Copilot
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working