The CLI throw the typeerror instead of return the error detail
Open
act-platform-engineering-squad
Core
Error Handling
feature-request
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
https://github.com/Azure/azure-cli/issues/14207
In the above repro, it is expected to display the error message but actually it throw the type error. By dig deep into the issue, I found it was caused by the line
https://github.com/Azure/azure-cli/blob/dev/src/azure-cli-core/azure/cli/core/util.py#L93
It returns a string not a dictionary probably because of the ex.response.text format. If call load again, it will work.
response_dict = json.loads(ex.response.text) // the first time, the type of response_dict is string
response_dict = json.loads(ex.response.text) // the second time, the type is dictionary.
@northtyphoon @yugangw-msft
Contributor guide
Assessment
This issue has not been assessed yet.