{"record":{"id":"b950249753123f93","repo":"kubesphere/kubesphere","slug":"empty-repository-name","errorCode":null,"errorMessage":"empty repository name","messagePattern":"empty repository name","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"pkg/kapis/resources/v1alpha3/handler.go","lineNumber":185,"sourceCode":"\t\tcanonicalizeRegistryError(request, response, err)\n\t\treturn\n\t}\n\n\tresponse.WriteHeaderAndJson(http.StatusOK, config, restful.MIME_JSON)\n}\n\n// GetRepositoryTags fetchs all tags of given repository, no paging.\nfunc (h *handler) GetRepositoryTags(request *restful.Request, response *restful.Response) {\n\tsecretName := request.QueryParameter(\"secret\")\n\tnamespace := request.PathParameter(\"namespace\")\n\trepository := request.QueryParameter(\"repository\")\n\n\tq := query.ParseQueryParameter(request)\n\n\tvar secret *v1.Secret\n\n\tif len(repository) == 0 {\n\t\tapi.HandleBadRequest(response, request, fmt.Errorf(\"empty repository name\"))\n\t\treturn\n\t}\n\n\tif len(secretName) != 0 {\n\t\tobject, err := h.resourceGetterV1alpha3.Get(\"secrets\", namespace, secretName)\n\t\tif errors.IsNotFound(err) {\n\t\t\tapi.HandleNotFound(response, request, err)\n\t\t}\n\t\tsecret = object.(*v1.Secret)\n\t}\n\n\ttags, err := h.registryHelper.ListRepositoryTags(secret, repository)\n\tif err != nil {\n\t\tcanonicalizeRegistryError(request, response, err)\n\t\treturn\n\t}\n\n\tif !q.Ascending {","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/kubesphere/kubesphere/blob/04a29b5c601470fa6bc2f2e92358dcb802a0d414/pkg/kapis/resources/v1alpha3/handler.go#L167-L203","documentation":"GetRepositoryTags guards the required 'repository' query parameter: it is empty, so there is nothing to query tags for and the request is rejected 400 before any registry call. Clients must pass ?repository=<name> alongside namespace/secret parameters.","triggerScenarios":"Thrown at pkg/kapis/resources/v1alpha3/handler.go:185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the repository query parameter, e.g. ?repository=library/nginx","Ensure the frontend form sends the repository field for this endpoint"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"04a29b5c601470fa6bc2f2e92358dcb802a0d414","analyzedAt":"2026-09-03T18:33:15.017Z","contentChangedAt":"2026-09-03T18:33:15.017Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}