{"record":{"id":"51e6f3c624c09818","repo":"slimtoolkit/slim","slug":"no-image-references-for-image-index","errorCode":null,"errorMessage":"no image references for image index","messagePattern":"no image references for image index","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/app/master/command/registry/handler_image_index.go","lineNumber":75,"sourceCode":"\t\t\t})\n\n\t\texitCode := command.ECTCommon | command.ECCNoDockerConnectInfo\n\t\txc.Out.State(\"exited\",\n\t\t\tovars{\n\t\t\t\t\"exit.code\": exitCode,\n\t\t\t\t\"version\":   v.Current(),\n\t\t\t\t\"location\":  fsutil.ExeDir(),\n\t\t\t})\n\t\txc.Exit(exitCode)\n\t}\n\txc.FailOn(err)\n\n\tif gparams.Debug {\n\t\tversion.Print(xc, cmdName, logger, client, false, gparams.InContainer, gparams.IsDSImage)\n\t}\n\n\tif len(cparams.ImageNames) == 0 {\n\t\txc.FailOn(fmt.Errorf(\"no image references for image index\"))\n\t}\n\n\tif !cparams.UseDockerCreds &&\n\t\t!(cparams.CredsAccount != \"\" && cparams.CredsSecret != \"\") {\n\t\txc.FailOn(fmt.Errorf(\"missing auth params\"))\n\t}\n\n\tremoteOpts := []remote.Option{\n\t\tremote.WithContext(context.Background()),\n\t}\n\n\tremoteOpts, err = ConfigureAuth(cparams.CommonCommandParams, remoteOpts)\n\txc.FailOn(err)\n\n\tnameOpts := []name.Option{\n\t\tname.WeakValidation,\n\t}\n","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/slimtoolkit/slim/blob/81940d17fa112cc678e32209214bcb2355cb3004/pkg/app/master/command/registry/handler_image_index.go#L57-L93","documentation":"OnImageIndexCreateCommand validates that at least one image reference was provided for building an image index (fat manifest). If cparams.ImageNames is empty, xc.FailOn aborts with this error because an index with no constituent images is meaningless.","triggerScenarios":"Calling the image-index create command without any image name arguments or with cparams.ImageNames left as an empty slice when invoking the handler programmatically.","commonSituations":"Forgetting to pass the individual image tags before the index name; a parsing bug that fails to populate ImageNames; config file where the images list is empty or misnamed.","solutions":["Pass one or more image references as arguments to the index create command","Populate cparams.ImageNames with valid references before calling OnImageIndexCreateCommand","Verify argument parsing (flags vs positionals) isn't swallowing the image names"],"exampleFix":"// before\nImageNames: []string{}\n// after\nImageNames: []string{\"registry.example.com/app:v1-amd64\", \"registry.example.com/app:v1-arm64\"}","handlingStrategy":"validation","validationCode":"if len(ImageNames) == 0 {\n    return errors.New(\"at least one image reference is required to create an index\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build ImageNames from an explicit, non-empty list of pushed arch-specific tags","Fail fast in scripts if the generated tag list is empty","Log the resolved image list before invoking the handler"],"tags":["validation","missing-argument","image-index"],"backgroundTag":"missing-required-argument","analyzedSha":"81940d17fa112cc678e32209214bcb2355cb3004","analyzedAt":"2026-08-31T23:06:12.682Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}