{"record":{"id":"46f8086be75c2dfe","repo":"goharbor/harbor","slug":"failed-to-delete-tag-s-from-repository-s-v","errorCode":null,"errorMessage":"failed to delete tag %s from repository %s: %v","messagePattern":"failed to delete tag (.+?) from repository (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/reg/adapter/azurecr/adapter.go","lineNumber":114,"sourceCode":"\t// This follows the same pattern as other registry adapters\n\n\t// Build the manifest deletion URL for Azure Container Registry\n\t// Use the standard /v2/{repository}/manifests/{tag} endpoint\n\tmanifestURL, err := url.Parse(fmt.Sprintf(\"%s/v2/%s/manifests/%s\", a.registryURL, repository, tag))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to build manifest deletion URL: %v\", err)\n\t}\n\n\t// Create DELETE request\n\treq, err := http.NewRequest(http.MethodDelete, manifestURL.String(), nil)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to create delete request: %v\", err)\n\t}\n\n\t// Use the existing client with authorizer to make the request\n\tresp, err := a.Client.Do(req)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to delete tag %s from repository %s: %v\", tag, repository, err)\n\t}\n\tdefer resp.Body.Close()\n\n\t// Check response status - Azure CR returns 202 Accepted for successful deletions\n\tif resp.StatusCode < 200 || resp.StatusCode > 299 {\n\t\treturn fmt.Errorf(\"failed to delete tag %s from repository %s: HTTP %d\", tag, repository, resp.StatusCode)\n\t}\n\n\tlog.Infof(\"Successfully deleted tag %s from repository %s\", tag, repository)\n\treturn nil\n}\n","sourceCodeStart":96,"sourceCodeEnd":126,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/reg/adapter/azurecr/adapter.go#L96-L126","documentation":"DeleteTag issued the DELETE request to Azure CR and the transport/client returned an error (network failure, TLS, timeout) before a response was received; tag, repository and transport error are wrapped.","triggerScenarios":"Thrown at src/pkg/reg/adapter/azurecr/adapter.go:114 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check network egress and DNS/TLS to the Azure registry endpoint","Retry the operation; transient network errors are expected","Inspect the wrapped error for timeout vs connection refused specifics"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","contentChangedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}