Azure / Azure/azure-sdk-for-rust
azure_core::Error assumes JSON format
- Dominant language
- Rust
- Stars
- 884
- Forks
- 365
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 109
Description
### Bug Title
azure_core::Error deserialization is hard-coded to JSON.
### Crate Name
azure_core
### Crate Version
latest
### Description
HTTP error response deserialization assumes JSON format, see [here](https://github.com/Azure/azure-sdk-for-rust/blob/5c7ded236f81f87b568557312ce7bbd17dbd549c/sdk/core/azure_core/src/error/error_response.rs#L201-L203) for an example (also search for `serde_json` in this file).
### Steps to Reproduce
Add a test that returns an azure_core::Error in XML format.
### Checklist
- [x] Follow our [Code of Conduct](https://github.com/Azure/azure-sdk-for-rust/blob/main/CODE_OF_CONDUCT.md)
- [x] Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
Contributor guide
Research direction
Start in sdk/core/azure_core/src/error/error_response.rs at the linked deserialization code and search that file for serde_json usage. Add the XML-format error response test described in the issue, then run the relevant azure_core tests and confirm the test passes without assuming JSON.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100