{"id":"ac472f636720f874","repo":"docker/cli","slug":"context-q-w","errorCode":null,"errorMessage":"context %q: %w","messagePattern":"context %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/context/store/metadatastore.go","lineNumber":66,"sourceCode":"\t}\n\tif getter == nil {\n\t\tvar res map[string]any\n\t\tif err := json.Unmarshal(payload, &res); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn res, nil\n\t}\n\ttyped := getter()\n\tif err := json.Unmarshal(payload, typed); err != nil {\n\t\treturn nil, err\n\t}\n\treturn reflect.ValueOf(typed).Elem().Interface(), nil\n}\n\nfunc (s *metadataStore) get(name string) (Metadata, error) {\n\tm, err := s.getByID(contextdirOf(name))\n\tif err != nil {\n\t\treturn m, fmt.Errorf(\"context %q: %w\", name, err)\n\t}\n\treturn m, nil\n}\n\nfunc (s *metadataStore) getByID(id contextdir) (Metadata, error) {\n\tfileName := filepath.Join(s.contextDir(id), metaFile)\n\tbytes, err := os.ReadFile(fileName)\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\treturn Metadata{}, notFound(fmt.Errorf(\"context not found: %w\", err))\n\t\t}\n\t\treturn Metadata{}, err\n\t}\n\tvar untyped untypedContextMetadata\n\tr := Metadata{\n\t\tEndpoints: make(map[string]any),\n\t}\n\tif err := json.Unmarshal(bytes, &untyped); err != nil {","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/context/store/metadatastore.go#L48-L84","documentation":"Error \"context %q: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/context/store/metadatastore.go:66 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}