docker/cli ยท error
got wrong object to inspect :%v
Error message
got wrong object to inspect :%v
What it means
Error "got wrong object to inspect :%v" thrown in docker/cli.
Source
Thrown at cli/command/node/formatter.go:207
func (c *nodeContext) EngineVersion() string {
return c.n.Description.Engine.EngineVersion
}
// inspectFormatWrite renders the context for a list of nodes.
func inspectFormatWrite(fmtCtx formatter.Context, refs []string, getRef inspect.GetRefFunc) error {
if fmtCtx.Format != nodeInspectPrettyTemplate {
return inspect.Inspect(fmtCtx.Output, refs, string(fmtCtx.Format), getRef)
}
return fmtCtx.Write(&nodeInspectContext{}, func(format func(subContext formatter.SubContext) error) error {
for _, ref := range refs {
nodeI, _, err := getRef(ref)
if err != nil {
return err
}
node, ok := nodeI.(swarm.Node)
if !ok {
return fmt.Errorf("got wrong object to inspect :%v", ok)
}
if err := format(&nodeInspectContext{Node: node}); err != nil {
return err
}
}
return nil
})
}
type nodeInspectContext struct {
swarm.Node
formatter.SubContext
}
func (ctx *nodeInspectContext) ID() string {
return ctx.Node.ID
}
View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at cli/command/node/formatter.go:207 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of docker/cli@e9452d6e78 (2026-08-01).
Data as JSON: /data/errors/d164c2dbfafd6b75.json.
Report an issue: GitHub.