Skip to content

Conversation

carols10cents
Copy link
Contributor

Hi, I was trying out the code added in #176, and if a container doesn't have any blobs in it, serde can't deserialize it. If I run the list_blobs_01 example as it is in my first commit, it panics with this error:

Error: SerdeXMLDeserializationError(Custom { field: "missing field `Blob`" })

The second commit in this PR fixes it by setting a default of an empty vector on the blobs field.

@ghost
Copy link

ghost commented Feb 18, 2021

CLA assistant check
All CLA requirements met.

Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I like this change. In the official Azure SDKs, we try to avoid returning null collections, so returning a new empty collection works well.

Copy link
Contributor

@MindFlavor MindFlavor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I also prefer an empty vector instead of an option in this case!

We should probably add a specific test in the E2E test collection to catch these bugs early.

@MindFlavor MindFlavor merged commit 14ff932 into Azure:master Feb 18, 2021
@carols10cents carols10cents deleted the issue/175/pr branch February 18, 2021 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants