Add feedback message for API responses with HTTP 204 No Content in CLI commands
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
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.
Contributor guide
Assessment
This issue has not been assessed yet.