-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Related command
az acr private-endpoint-connection delete -r myRegistry -n anyValue
Is your feature request related to a problem? Please describe.
When the API returns an HTTP 204 No Content status code, the lack of any output can be misleading to the user. It may give the impression that the resource was successfully deleted, even though no resource was actually affected. This is particularly confusing when 204 is used instead of a more intuitive 404 for non-existent resources.
Describe the solution you'd like
Print a warning in such cases, such as "Warning: No content" or "Warning: No resource was deleted." This would help clarify to the user that the command did not perform any deletion, even though the API response was not an error.
Describe alternatives you've considered
The only alternative would be if ARM enforced the use of 404 instead of 204 in these scenarios, which is outside the CLI's scope of control. A client-side message remains the most practical solution.
Additional context
This issue is not limited to this specific command; it can impact any command interacting with APIs that return 204 status codes.