{"id":"c20adb14ece7333b","repo":"docker/cli","slug":"failed-to-remove-tls-data-w","errorCode":null,"errorMessage":"failed to remove TLS data: %w","messagePattern":"failed to remove TLS data: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/context/store/tlsstore.go","lineNumber":51,"sourceCode":"\t}\n\treturn atomicwriter.WriteFile(filepath.Join(endpointDir, filename), data, 0o600)\n}\n\nfunc (s *tlsStore) getData(name, endpointName, filename string) ([]byte, error) {\n\tdata, err := os.ReadFile(filepath.Join(s.endpointDir(name, endpointName), filename))\n\tif err != nil {\n\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}","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/context/store/tlsstore.go#L33-L69","documentation":"Error \"failed to remove TLS data: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/context/store/tlsstore.go:51 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}