aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/containers_top.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/handlers/compat/containers_top.go')
-rw-r--r--pkg/api/handlers/compat/containers_top.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/api/handlers/compat/containers_top.go b/pkg/api/handlers/compat/containers_top.go
index 6970cabe3..6ca178cf7 100644
--- a/pkg/api/handlers/compat/containers_top.go
+++ b/pkg/api/handlers/compat/containers_top.go
@@ -33,14 +33,12 @@ func TopContainer(w http.ResponseWriter, r *http.Request) {
PsArgs: psArgs,
}
if err := decoder.Decode(&query, r.URL.Query()); err != nil {
- utils.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest,
- errors.Wrapf(err, "failed to parse parameters for %s", r.URL.String()))
+ utils.Error(w, http.StatusBadRequest, errors.Wrapf(err, "failed to parse parameters for %s", r.URL.String()))
return
}
if query.Delay < 1 {
- utils.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest,
- fmt.Errorf("\"delay\" parameter of value %d < 1", query.Delay))
+ utils.Error(w, http.StatusBadRequest, fmt.Errorf("\"delay\" parameter of value %d < 1", query.Delay))
return
}