Merge pull request #8875 from rhatdan/image

Allow image errors to bubble up from lower level functions.
This commit is contained in:
OpenShift Merge Robot
2021-01-04 17:30:22 -05:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@ -497,7 +497,7 @@ func (ir *Runtime) getLocalImage(inputName string) (string, *storage.Image, erro
return inputName, repoImage, nil
}
return "", nil, errors.Wrapf(ErrNoSuchImage, err.Error())
return "", nil, err
}
// ID returns the image ID as a string

View File

@ -45,7 +45,8 @@ func findImageInRepotags(search imageParts, images []*Image) (*storage.Image, er
}
}
if len(candidates) == 0 {
return nil, errors.Errorf("unable to find a name and tag match for %s in repotags", searchName)
return nil, errors.Wrapf(define.ErrNoSuchImage, "unable to find a name and tag match for %s in repotags", searchName)
}
// If more then one candidate and the candidates all have same name