summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/libpod/containers.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api/handlers/libpod/containers.go')
-rw-r--r--pkg/api/handlers/libpod/containers.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/api/handlers/libpod/containers.go b/pkg/api/handlers/libpod/containers.go
index 4639093f2..343c0d0b3 100644
--- a/pkg/api/handlers/libpod/containers.go
+++ b/pkg/api/handlers/libpod/containers.go
@@ -73,8 +73,13 @@ func ListContainers(w http.ResponseWriter, r *http.Request) {
}
filterMap, err := util.PrepareFilters(r)
+ if err != nil {
+ utils.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError,
+ errors.Wrapf(err, "failed to decode filter parameters for %s", r.URL.String()))
+ return
+ }
- if dErr := decoder.Decode(&query, r.URL.Query()); dErr != nil || err != nil {
+ if err := decoder.Decode(&query, r.URL.Query()); err != nil {
utils.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError,
errors.Wrapf(err, "failed to parse parameters for %s", r.URL.String()))
return