{"id":"3871c5af7c25706a","repo":"docker/cli","slug":"s-w","errorCode":null,"errorMessage":"%s: %w","messagePattern":"(.+?): %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/context/options.go","lineNumber":76,"sourceCode":"\t\t{\n\t\t\tname:        keySkipTLSVerify,\n\t\t\tdescription: \"Skip TLS certificate validation\",\n\t\t},\n\t}\n)\n\nfunc parseBool(config map[string]string, name string) (bool, error) {\n\tstrVal, ok := config[name]\n\tif !ok {\n\t\treturn false, nil\n\t}\n\tres, err := strconv.ParseBool(strVal)\n\tif err != nil {\n\t\tvar nErr *strconv.NumError\n\t\tif errors.As(err, &nErr) {\n\t\t\treturn res, fmt.Errorf(\"%s: parsing %q: %w\", name, nErr.Num, nErr.Err)\n\t\t}\n\t\treturn res, fmt.Errorf(\"%s: %w\", name, err)\n\t}\n\treturn res, nil\n}\n\nfunc validateConfig(config map[string]string, allowedKeys map[string]struct{}) error {\n\tvar errs []error\n\tfor k := range config {\n\t\tif _, ok := allowedKeys[k]; !ok {\n\t\t\terrs = append(errs, errors.New(\"unrecognized config key: \"+k))\n\t\t}\n\t}\n\treturn errors.Join(errs...)\n}\n\nfunc getDockerEndpoint(contextStore store.Reader, config map[string]string) (docker.Endpoint, error) {\n\tif err := validateConfig(config, allowedDockerConfigKeys); err != nil {\n\t\treturn docker.Endpoint{}, err\n\t}","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/context/options.go#L58-L94","documentation":"Error \"%s: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/context/options.go:76 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}