diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-01-24 13:14:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-24 13:14:44 -0500 |
commit | 54bfabb78a09bc50f270a81756a303e49965f253 (patch) | |
tree | 12fad22a19318dd8ba1ca583cac2b7ba587cff83 /pkg/api/handlers/compat/images_build.go | |
parent | b75d6baf074a61f2119b8619c86bd2fae1cb2833 (diff) | |
parent | 7938f32c532557eff69ada6a29b46906c3e691a3 (diff) | |
download | podman-54bfabb78a09bc50f270a81756a303e49965f253.tar.gz podman-54bfabb78a09bc50f270a81756a303e49965f253.tar.bz2 podman-54bfabb78a09bc50f270a81756a303e49965f253.zip |
Merge pull request #12973 from jmguzik/api-unused-param
Remove unused param from utils.Error in pkg/api and clean API handlers
Diffstat (limited to 'pkg/api/handlers/compat/images_build.go')
-rw-r--r-- | pkg/api/handlers/compat/images_build.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go index d9c9558e5..707551eab 100644 --- a/pkg/api/handlers/compat/images_build.go +++ b/pkg/api/handlers/compat/images_build.go @@ -133,7 +133,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { decoder := r.Context().Value(api.DecoderKey).(*schema.Decoder) if err := decoder.Decode(&query, r.URL.Query()); err != nil { - utils.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest, err) + utils.Error(w, http.StatusBadRequest, err) return } @@ -291,7 +291,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { if len(tags) > 0 { possiblyNormalizedName, err := utils.NormalizeToDockerHub(r, tags[0]) if err != nil { - utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "error normalizing image")) + utils.Error(w, http.StatusInternalServerError, errors.Wrap(err, "error normalizing image")) return } output = possiblyNormalizedName @@ -314,7 +314,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { for i := 1; i < len(tags); i++ { possiblyNormalizedTag, err := utils.NormalizeToDockerHub(r, tags[i]) if err != nil { - utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "error normalizing image")) + utils.Error(w, http.StatusInternalServerError, errors.Wrap(err, "error normalizing image")) return } additionalTags = append(additionalTags, possiblyNormalizedTag) @@ -457,7 +457,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { creds, authfile, err := auth.GetCredentials(r) if err != nil { // Credential value(s) not returned as their value is not human readable - utils.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest, err) + utils.Error(w, http.StatusBadRequest, err) return } defer auth.RemoveAuthfile(authfile) @@ -466,7 +466,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) { if fromImage != "" { possiblyNormalizedName, err := utils.NormalizeToDockerHub(r, fromImage) if err != nil { - utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "error normalizing image")) + utils.Error(w, http.StatusInternalServerError, errors.Wrap(err, "error normalizing image")) return } fromImage = possiblyNormalizedName |