Skip to content

Commit fae480c

Browse files
fix: include reference string in invalid reference format error (#1303)
When NewRepository fails to parse an image reference, log the actual reference string that failed validation. This makes it possible to identify which image reference is causing the "invalid reference format" error. Previously, users would see: Could not get tags from registry: invalid reference format Now users will see: Failed to create repository for image 'invalid@reference': invalid reference format This provides the necessary context to debug configuration issues with malformed image references. Fixes #1303 Signed-off-by: Ellis Valentiner <[email protected]>
1 parent 58d2b7e commit fae480c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

registry-scanner/pkg/registry/registry.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func (ep *RegistryEndpoint) GetTags(ctx context.Context, img *image.ContainerIma
4444
}
4545
err = regClient.NewRepository(nameInRegistry)
4646
if err != nil {
47+
logCtx.Errorf("Failed to create repository for image '%s': %v", nameInRegistry, err)
4748
return nil, err
4849
}
4950
tTags, err := regClient.Tags(ctx)

0 commit comments

Comments
 (0)