{"id":"8906de60c81e018a","repo":"docker/cli","slug":"failed-to-remove-tls-data-for-endpoint-s-w","errorCode":null,"errorMessage":"failed to remove TLS data for endpoint %s: %w","messagePattern":"failed to remove TLS data for endpoint (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/context/store/tlsstore.go","lineNumber":58,"sourceCode":"\t\tif os.IsNotExist(err) {\n\t\t\treturn nil, notFound(fmt.Errorf(\"TLS data for %s/%s/%s does not exist\", name, endpointName, filename))\n\t\t}\n\t\treturn nil, fmt.Errorf(\"failed to read TLS data for endpoint %s: %w\", endpointName, err)\n\t}\n\treturn data, nil\n}\n\n// remove deletes all TLS data for the given context.\nfunc (s *tlsStore) remove(name string) error {\n\tif err := os.RemoveAll(s.contextDir(name)); err != nil {\n\t\treturn fmt.Errorf(\"failed to remove TLS data: %w\", err)\n\t}\n\treturn nil\n}\n\nfunc (s *tlsStore) removeEndpoint(name, endpointName string) error {\n\tif err := os.RemoveAll(s.endpointDir(name, endpointName)); err != nil {\n\t\treturn fmt.Errorf(\"failed to remove TLS data for endpoint %s: %w\", endpointName, err)\n\t}\n\treturn nil\n}\n\nfunc (s *tlsStore) listContextData(name string) (map[string]EndpointFiles, error) {\n\tcontextDir := s.contextDir(name)\n\tepFSs, err := os.ReadDir(contextDir)\n\tif err != nil {\n\t\tif os.IsNotExist(err) {\n\t\t\treturn map[string]EndpointFiles{}, nil\n\t\t}\n\t\treturn nil, fmt.Errorf(\"failed to list TLS files for context %s: %w\", name, err)\n\t}\n\tr := make(map[string]EndpointFiles)\n\tfor _, epFS := range epFSs {\n\t\tif epFS.IsDir() {\n\t\t\tfss, err := os.ReadDir(filepath.Join(contextDir, epFS.Name()))\n\t\t\tif os.IsNotExist(err) {","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/context/store/tlsstore.go#L40-L76","documentation":"Error \"failed to remove TLS data for endpoint %s: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/context/store/tlsstore.go:58 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}