diff options
Diffstat (limited to 'pkg/domain/filters')
-rw-r--r-- | pkg/domain/filters/containers.go | 6 | ||||
-rw-r--r-- | pkg/domain/filters/pods.go | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/pkg/domain/filters/containers.go b/pkg/domain/filters/containers.go index 85ba4f84f..e30013647 100644 --- a/pkg/domain/filters/containers.go +++ b/pkg/domain/filters/containers.go @@ -213,8 +213,10 @@ func GenerateContainerFilterFuncs(filter string, filterValues []string, r *libpo for _, val := range filterValues { net, err := r.Network().NetworkInspect(val) if err != nil { - // ignore not found errors - break + if errors.Cause(err) == define.ErrNoSuchNetwork { + continue + } + return nil, err } inputNetNames = append(inputNetNames, net.Name) } diff --git a/pkg/domain/filters/pods.go b/pkg/domain/filters/pods.go index 2f9442dff..8eea8968d 100644 --- a/pkg/domain/filters/pods.go +++ b/pkg/domain/filters/pods.go @@ -131,8 +131,10 @@ func GeneratePodFilterFunc(filter string, filterValues []string, r *libpod.Runti for _, val := range filterValues { net, err := r.Network().NetworkInspect(val) if err != nil { - // ignore not found errors - break + if errors.Cause(err) == define.ErrNoSuchNetwork { + continue + } + return nil, err } inputNetNames = append(inputNetNames, net.Name) } |