Merge pull request #11859 from HuKeping/eof

Add nice error message
Upstream-commit: fe9f3227b18504add673b9c62669032c3f17e726
Component: engine
This commit is contained in:
Michael Crosby
2015-03-30 13:53:09 -07:00

View File

@ -662,7 +662,7 @@ func postImagesPush(eng *engine.Engine, version version.Version, w http.Response
} else {
// the old format is supported for compatibility if there was no authConfig header
if err := json.NewDecoder(r.Body).Decode(authConfig); err != nil {
return err
return fmt.Errorf("Bad parameters and missing X-Registry-Auth: %v", err)
}
}