{"id":"db5f231216f1fda3","repo":"docker/cli","slug":"unexpected-key-s-in-s","errorCode":null,"errorMessage":"unexpected key '%s' in '%s'","messagePattern":"unexpected key '(.+?)' in '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"opts/gpus.go","lineNumber":83,"sourceCode":"\t\t\treq.Driver = val\n\t\tcase \"count\":\n\t\t\treq.Count, err = parseCount(val)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\tcase \"device\":\n\t\t\treq.DeviceIDs = strings.Split(val, \",\")\n\t\tcase \"capabilities\":\n\t\t\treq.Capabilities = [][]string{append(strings.Split(val, \",\"), \"gpu\")}\n\t\tcase \"options\":\n\t\t\tr := csv.NewReader(strings.NewReader(val))\n\t\t\toptFields, err := r.Read()\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to read gpu options: %w\", err)\n\t\t\t}\n\t\t\treq.Options = ConvertKVStringsToMap(optFields)\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unexpected key '%s' in '%s'\", key, field)\n\t\t}\n\t}\n\n\tif _, ok := seen[\"count\"]; !ok && req.DeviceIDs == nil {\n\t\treq.Count = 1\n\t}\n\tif req.Options == nil {\n\t\treq.Options = make(map[string]string)\n\t}\n\tif req.Capabilities == nil {\n\t\treq.Capabilities = [][]string{{\"gpu\"}}\n\t}\n\n\to.values = append(o.values, req)\n\treturn nil\n}\n\n// Type returns the type of this option","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/opts/gpus.go#L65-L101","documentation":"Error \"unexpected key '%s' in '%s'\" thrown in docker/cli.","triggerScenarios":"Thrown at opts/gpus.go:83 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}