For command az quota list
, CLI shows error ServiceUnavailable
when throttling occurs
#28075
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
quota
Service Attention
This issue is responsible by Azure service team.
Describe the bug
When running the command
az quota list --scope /subscriptions/<my-subscription-id>/providers/Microsoft.Network/locations/eastus
in a situation where throttling is occurring, it displays the following error instead of a different error that would convey that throttling specifically is the problem occurring. This error is more generic:I know that throttling is occurring in this situation because I'm also testing with a Go program using the Go SDK:
This code encounters an error from
resp.NextPage
:I'm reporting this because I think the CLI could be improved to detect when throttling is occurring and tell the user that this is the specific reason the command could not be completed successfully. In HTTP, "Service Unavailable" usually corresponds to a situation where the error occurred server side, indicating that there is nothing the client could do to make the request successful.
In this case, this is not true, and the client can make the request successful by trying again later. If my assumption that the CLI is powered by the REST API for this command is true, the Retry-After header I've observed in the response in the Go example might be helpful for this too, providing info the CLI user can use to help them make a successful request if they try again after waiting.
Related command
az quota show
Errors
(ServiceUnavailable) Service Unavailable. Please retry again later.
Code: ServiceUnavailable
Message: Service Unavailable. Please retry again later.
Issue script & Debug output
Expected behavior
CLI output shows that my request may succeed if I wait again and try again later. CLI output tells me how long I should wait.
Environment Summary
Additional context
No response
The text was updated successfully, but these errors were encountered: