You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like we should be checking the content type in order to deserialize the error correctly.
Example crash:
(blobs) PS C:\Users\caperal\repos\azure-sdk-for-python\sdk\storage\azure-storage-blob\azure\storage\blob\_generated_patched> python .\test_xml.py
Traceback (most recent call last):
File "C:\Users\caperal\repos\azure-sdk-for-python\sdk\storage\azure-storage-blob\azure\storage\blob\_generated_patched\test_xml.py", line 26, in <module>
res = client.blob.query(
File "C:\Users\caperal\repos\azure-sdk-for-python\sdk\core\azure-core\azure\core\tracing\decorator.py", line 105, in wrapper_use_tracer
return func(*args, **kwargs)
File "C:\Users\caperal\repos\azure-sdk-for-python\sdk\storage\azure-storage-blob\azure\storage\blob\_generated_patched\azure\storage\blob\operations\_operations.py", line 9816, in query
error = _deserialize(_models.StorageError, response.json())
File "C:\Users\caperal\repos\azure-sdk-for-python\sdk\core\azure-core\azure\core\rest\_http_response_impl.py", line 331, in json
self._json = loads(self.text())
File "C:\Python310\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Python310\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python310\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The text was updated successfully, but these errors were encountered:
Generated python using this spec: https://github.com/Azure/azure-rest-api-specs/tree/feature/blob-tsp/specification/storage/Microsoft.BlobStorage
While running some tests I noticed that we kept crashing when there was an error from the service. Seems we dont support xml error deserialization.
The line that is causing the error:
Seems like we should be checking the content type in order to deserialize the error correctly.
Example crash:
The text was updated successfully, but these errors were encountered: