dynamodb example expects attributes
#1228
Labels
documentation
This is a problem with documentation
needs-triage
This issue or PR still needs to be triaged.
Describe the issue
Dear Contributors,
I have come upon this example when using the dynamodb rust SDK. It seems to me that some return values are expected in the default case here, i.e. when
.set_return_values(None)
. However, the actual behavior is that nothing is returned in the response object for keyattribute
, comparePutItemOutput { attributes: None, ...
. This behavior is in agreement with the API documentation.The idea to have your new item returned as a response is nice, but if it does not work it makes it harder to engage with the example, which is why I would propose to change the example accordingly and prevent confusions.
I would also like to mention, that using other enum values, e.g.
.set_return_values(Some(ReturnValue::AllNew))
, will not result in a compile time, but a runtime error. I would suspect this behavior to be unfavored and unnecessary. I do not consider this to be an error, but I would say it is "error-adjacent" considering the type safety attitude of the language.Am I missing something here?
Thanks!
Links
aws-sdk-rust/examples/examples/dynamodb/src/scenario/add.rs
Line 46 in 9d3959a
The text was updated successfully, but these errors were encountered: