Fix one of the bugs reported by https://github.com/docker/hub-tool/issues/178 and improve error handling for the repository deletion. The repository cannot be deleted if Docker Hub username is not provided.
how to reproduce the issue:
# 1
hub-tool repo rm test
# 2
the output is a successful message because the HTTP response is not validated.
- How I did it
The fix includes the username to the repository deletion endpoint
Adds new error handler for HTTP Not Found
In case the repository doesn't exist, there is a proper error response: Error: resource not found
Improves the error message, making it clear which repository was deleted
Improve how URL is built before requesting the API
- How to verify it
The impacted changes can be tested via:
./hub-tool repo rm repository-name
- Description for the changelog
Allow repository deletion by using repository name only (without username) and add error handler for resource/repository not found.
p.s: this PR doesn't fix one of the reported errors:
- What I did
Fix one of the bugs reported by https://github.com/docker/hub-tool/issues/178 and improve error handling for the repository deletion. The repository cannot be deleted if Docker Hub username is not provided.
how to reproduce the issue:
- How I did it
Error: resource not found
- How to verify it
The impacted changes can be tested via:
./hub-tool repo rm repository-name
- Description for the changelog
Allow repository deletion by using repository name only (without username) and add error handler for resource/repository not found.
p.s: this PR doesn't fix one of the reported errors:
Error: operation not permitted error
Since this is an ongoing discussion: https://github.com/docker/hub-tool/issues/172
- A picture of a cute animal (not mandatory)