{"id":"aa63bd497ef80cac","repo":"docker/cli","slug":"got-wrong-object-to-inspect-v","errorCode":null,"errorMessage":"got wrong object to inspect :%v","messagePattern":"got wrong object to inspect :(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/config/formatter.go","lineNumber":133,"sourceCode":"\t\treturn \"\"\n\t}\n\treturn c.c.Spec.Annotations.Labels[name]\n}\n\n// inspectFormatWrite renders the context for a list of configs\nfunc inspectFormatWrite(fmtCtx formatter.Context, refs []string, getRef inspect.GetRefFunc) error {\n\tif fmtCtx.Format != configInspectPrettyTemplate {\n\t\treturn inspect.Inspect(fmtCtx.Output, refs, string(fmtCtx.Format), getRef)\n\t}\n\treturn fmtCtx.Write(&configInspectContext{}, func(format func(subContext formatter.SubContext) error) error {\n\t\tfor _, ref := range refs {\n\t\t\tconfigI, _, err := getRef(ref)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tconfig, ok := configI.(swarm.Config)\n\t\t\tif !ok {\n\t\t\t\treturn fmt.Errorf(\"got wrong object to inspect :%v\", ok)\n\t\t\t}\n\t\t\tif err := format(&configInspectContext{Config: config}); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t})\n}\n\ntype configInspectContext struct {\n\tswarm.Config\n\tformatter.SubContext\n}\n\nfunc (ctx *configInspectContext) ID() string {\n\treturn ctx.Config.ID\n}\n","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/config/formatter.go#L115-L151","documentation":"Error \"got wrong object to inspect :%v\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/config/formatter.go:133 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}