diff --git a/libimage/pull.go b/libimage/pull.go index e872b1b80..3db1b2992 100644 --- a/libimage/pull.go +++ b/libimage/pull.go @@ -115,7 +115,7 @@ func (r *Runtime) Pull(ctx context.Context, name string, pullPolicy config.PullP // off and entirely ignored. The digest is the sole source of truth. normalizedName, _, normalizeError := normalizeTaggedDigestedString(name) if normalizeError != nil { - return nil, normalizeError + return nil, fmt.Errorf(`parsing reference %q: %w`, name, normalizeError) } name = normalizedName diff --git a/libimage/runtime.go b/libimage/runtime.go index 632f0fccf..1baf41d5d 100644 --- a/libimage/runtime.go +++ b/libimage/runtime.go @@ -250,7 +250,7 @@ func (r *Runtime) LookupImage(name string, options *LookupImageOptions) (*Image, // off and entirely ignored. The digest is the sole source of truth. normalizedName, possiblyUnqualifiedNamedReference, err := normalizeTaggedDigestedString(name) if err != nil { - return nil, "", err + return nil, "", fmt.Errorf(`parsing reference %q: %w`, name, err) } name = normalizedName