mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 21:21:42 +00:00
Change HTTP code: 404 to a more user friendly Image Not found msg
Docker-DCO-1.1-Signed-off-by: William Henry <whenry@redhat.com> (github: ipbabble)
This commit is contained in:
+6
-1
@@ -1195,7 +1195,12 @@ func (srv *Server) pullRepository(r *registry.Registry, out io.Writer, localName
|
||||
|
||||
repoData, err := r.GetRepositoryData(remoteName)
|
||||
if err != nil {
|
||||
return err
|
||||
if strings.Contains(err.Error(), "HTTP code: 404") {
|
||||
return fmt.Errorf("Error: image %s not found", remoteName)
|
||||
} else {
|
||||
// Unexpected HTTP error
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
utils.Debugf("Retrieving the tag list")
|
||||
|
||||
Reference in New Issue
Block a user