Merge pull request #46685 from rumpl/c8d-tag-does-not-exist

c8d: Return the "tag does not exist error"
This commit is contained in:
Brian Goff 2023-11-02 12:33:36 -07:00 committed by GitHub
commit 2f138d860e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,6 +93,9 @@ func (i *ImageService) pushRef(ctx context.Context, targetRef reference.Named, m
img, err := i.client.ImageService().Get(ctx, targetRef.String())
if err != nil {
if cerrdefs.IsNotFound(err) {
return errdefs.NotFound(fmt.Errorf("tag does not exist: %s", reference.FamiliarString(targetRef)))
}
return errdefs.NotFound(err)
}