浏览代码

Merge pull request #11859 from HuKeping/eof

Add nice error message
Michael Crosby 10 年之前
父节点
当前提交
fe9f3227b1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      api/server/server.go

+ 1 - 1
api/server/server.go

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