Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StatusNotFound is not enough for verifying the ErrNoSuchImage #770

Closed
shiyuleixia opened this issue Jan 16, 2019 · 1 comment
Closed

StatusNotFound is not enough for verifying the ErrNoSuchImage #770

shiyuleixia opened this issue Jan 16, 2019 · 1 comment

Comments

@shiyuleixia
Copy link

if e, ok := err.(*Error); ok {
if e.Status == http.StatusNotFound {
return nil, ErrNoSuchImage
}

this part should also justify the exact error message ,such as this:
if e.Status == http.StatusNotFound && strings.Contains(e.Message, "No such image")

because it the network resource is not exist ,the docker daemon service also response StatusNotFound

@fsouza
Copy link
Owner

fsouza commented Jan 16, 2019

dup of #528, but thanks for reporting, I had forgotten about this.

@fsouza fsouza closed this as completed Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants