-
Notifications
You must be signed in to change notification settings - Fork 320
[Storage] Add StorageError model type
#3011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[Storage] Add StorageError model type
#3011
Conversation
|
cc: @heaths Heath, any pointers here on how to proceed with accessing the raw response on an Error response. Thanks! |
StorageError model type
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
…al, exhaustively match possible XML value nodes
| @@ -120,7 +119,7 @@ impl StorageError { | |||
| additional_fields: HashMap<String, Value>, | |||
| } | |||
|
|
|||
| let xml_fields = azure_core::xml::read_xml::<StorageErrorXml>(xml_body)?; | |||
| let xml_fields = xml::from_xml::<_, StorageErrorXml>(xml_body)?; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you passing the XML body and the raw_response? That's all available via raw_response.body().xml(). Also, if you're just getting data out of the raw body to format, borrow strings for memory efficiency: https://serde.rs/lifetimes.html#borrowing-data-in-a-derived-impl. We do this for Azure standard errors. Don't waste memory.
stdout for
test_storage_error_model: