{"record":{"id":"aacf2b07dcab88d2","repo":"goharbor/harbor","slug":"empty-uuid-to-set-default","errorCode":null,"errorMessage":"empty UUID to set default","messagePattern":"empty UUID to set default","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/scan/scanner/manager.go","lineNumber":165,"sourceCode":"\n// List ...\nfunc (bm *basicManager) List(ctx context.Context, query *q.Query) ([]*scanner.Registration, error) {\n\tregs, err := scanner.ListRegistrations(ctx, query)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, r := range regs {\n\t\tif err := decryptCredential(r); err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"decrypt credential: list registrations\")\n\t\t}\n\t}\n\treturn regs, nil\n}\n\n// SetAsDefault ...\nfunc (bm *basicManager) SetAsDefault(ctx context.Context, registrationUUID string) error {\n\tif len(registrationUUID) == 0 {\n\t\treturn errors.New(\"empty UUID to set default\")\n\t}\n\n\treturn scanner.SetDefaultRegistration(ctx, registrationUUID)\n}\n\n// GetDefault ...\nfunc (bm *basicManager) GetDefault(ctx context.Context) (*scanner.Registration, error) {\n\tr, err := scanner.GetDefaultRegistration(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif r != nil {\n\t\tif err := decryptCredential(r); err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"decrypt credential: get default registration\")\n\t\t}\n\t}\n\treturn r, nil\n}","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/scan/scanner/manager.go#L147-L183","documentation":"Error \"empty UUID to set default\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/scan/scanner/manager.go:165 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}