Azure / azure-sdk-for-rust

This repository is for active development of the *unofficial* Azure SDK for Rust. This repository is *not* supported by the Azure SDK team.
MIT License
680 stars 232 forks source link

Support xml error respsonse #1631

Closed merlinio2000 closed 2 months ago

merlinio2000 commented 3 months ago

closes #1275

As mentioned in the issue for those places that only need the error code it would've been easier to get it from the headers but I'm unsure whether there are any case where this information is only provided through the body. So to keep the current behavior I decided to keep parsing it from the body (now based on content-type though)

If you think it would be alright to rely solely on the headers than I'd be happy to change that, it would remove a bit of code and prevent having to parse the body in some cases.

EDIT: Thanks to the all_tests script I discovered the issue of quick-xml being behind the xml feature flag. I see two options but don't know which one is better:

To quick fix for CI I will remove quick-xml from the xml feature for now. I'm thankful for any further guidance here