Merge pull request #13324 from duglin/BadRCOnVersion

Make version check return 400 instead of 404
This commit is contained in:
Alexander Morozov
2015-05-20 11:13:56 -07:00
4 changed files with 25 additions and 1 deletions
+1 -1
View File
@@ -1426,7 +1426,7 @@ func makeHttpHandler(logging bool, localMethod string, localRoute string, handle
}
if version.GreaterThan(api.APIVERSION) {
http.Error(w, fmt.Errorf("client and server don't have same version (client API version: %s, server API version: %s)", version, api.APIVERSION).Error(), http.StatusNotFound)
http.Error(w, fmt.Errorf("client and server don't have same version (client API version: %s, server API version: %s)", version, api.APIVERSION).Error(), http.StatusBadRequest)
return
}