Open SorenHN opened 3 weeks ago
Hi @SorenHN,
2.56.0 is not the latest Azure CLI(2.61.0).
If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.
Thank you for opening this issue, we will look into it.
Hi - Thank you for the reminder that i did not use the newest version of az
.
I also tried with version 2.61.0
where i got the error message Operation returned an invalid status 'Bad Request'
, which is better as it is not wrong.
But I could still see it making sense to return an empty list instead of an error message.
how about splitting it into 2 steps:
Hi - It does not make a difference.
az network private-dns zone list
still throws an error instead of returning and empty list.
i cannot reproduce it,
Describe the bug
When calling
az network private-dns zone list --subscription <SUBSCRIPTION_NAME>
with a subscription which exists but does not contain a private dns zone, I get any error message indicating the subscription does not exist. This is incorrect, the error message should instead indicate that no dns zones was found in the given subscription.You could also argue that no error message should be displayed, but instead an empty list should be returned as the result.
Related command
az network private-dns zone list
Errors
Issue script & Debug output
Expected behavior
An empty list is returned instead of an error message.
Environment Summary
azure-cli 2.56.0 *
core 2.56.0 * telemetry 1.1.0
Extensions: account 0.2.5
Dependencies: msal 1.24.0b2 azure-mgmt-resource 23.1.0b2
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe' Extensions directory 'C:\Users\SørenHerskindNielsen.azure\cliextensions'
Python (Windows) 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)]
Additional context
No response