From 5d7b31da73bc3d9a3c0872fa912fef273b574e81 Mon Sep 17 00:00:00 2001 From: baude Date: Sat, 11 Aug 2018 10:07:45 -0500 Subject: [PATCH] when searching, survive errors for multiple registries when searching multiple registries for images, if we get an error on one of the searches, we should keep going and complete the search. if there is only one search registry however, we will return an error. Resolves: #1255 Signed-off-by: baude Closes: #1257 Approved by: mheon --- pkg/varlinkapi/images.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go index f1167c6e26..da19483b34 100644 --- a/pkg/varlinkapi/images.go +++ b/pkg/varlinkapi/images.go @@ -367,6 +367,12 @@ func (i *LibpodAPI) SearchImage(call iopodman.VarlinkCall, name string, limit in for _, reg := range registries { results, err := docker.SearchRegistry(getContext(), sc, reg, name, int(limit)) if err != nil { + // If we are searching multiple registries, don't make something like an + // auth error fatal. Unfortunately we cannot differentiate between auth + // errors and other possibles errors + if len(registries) > 1 { + continue + } return call.ReplyErrorOccurred(err.Error()) } for _, result := range results {