Skip to content

Commit

Permalink
c8d: Return the "tag does not exist error"
Browse files Browse the repository at this point in the history
In the tagged case the error message when the image/tag is not found
should be "tag does not exist: ref"

Signed-off-by: Djordje Lukic <[email protected]>
  • Loading branch information
rumpl committed Oct 20, 2023
1 parent c3ca4f5 commit 8166818
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions daemon/containerd/image_push.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,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)
}

Expand Down

0 comments on commit 8166818

Please sign in to comment.