{"record":{"id":"1b04e6a9a1cc9fe7","repo":"docker/cli","slug":"errors-pretty-printing-info","errorCode":null,"errorMessage":"errors pretty printing info","messagePattern":"errors pretty printing info","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/command/system/info.go","lineNumber":212,"sourceCode":"\t}\n\tif info.ClientInfo != nil {\n\t\tprettyPrintClientInfo(streams, *info.ClientInfo)\n\t}\n\tfor _, err := range info.ClientErrors {\n\t\tfprintln(streams.Err(), \"ERROR:\", err)\n\t}\n\n\tfprintln(streams.Out())\n\tfprintln(streams.Out(), \"Server:\")\n\tif info.Info != nil {\n\t\tprettyPrintServerInfo(streams, &info)\n\t}\n\tfor _, err := range info.ServerErrors {\n\t\tfprintln(streams.Err(), \"ERROR:\", err)\n\t}\n\n\tif len(info.ServerErrors) > 0 || len(info.ClientErrors) > 0 {\n\t\treturn errors.New(\"errors pretty printing info\")\n\t}\n\treturn nil\n}\n\nfunc prettyPrintClientInfo(streams command.Streams, info clientInfo) {\n\tfprintlnNonEmpty(streams.Out(), \" Version:   \", info.Version)\n\tfprintln(streams.Out(), \" Context:   \", info.Context)\n\tfprintln(streams.Out(), \" Debug Mode:\", info.Debug)\n\n\tif len(info.Plugins) > 0 {\n\t\tfprintln(streams.Out(), \" Plugins:\")\n\t\tfor _, p := range info.Plugins {\n\t\t\tif p.Err == nil {\n\t\t\t\tfprintf(streams.Out(), \"  %s: %s (%s)\\n\", p.Name, p.ShortDescription, p.Vendor)\n\t\t\t\tfprintlnNonEmpty(streams.Out(), \"    Version: \", p.Version)\n\t\t\t\tfprintlnNonEmpty(streams.Out(), \"    Path:    \", p.Path)\n\t\t\t} else {\n\t\t\t\tinfo.Warnings = append(info.Warnings, fmt.Sprintf(\"WARNING: Plugin %q is not valid: %s\", p.Path, p.Err))","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/docker/cli/blob/4f84911bfe8811e9b028e4b1fee8e7510be79387/cli/command/system/info.go#L194-L230","documentation":"Returned by prettyPrintInfo (system info.go:211-213) as an aggregate sentinel AFTER it has already printed each individual client/server error to stderr. It is raised whenever info.ClientErrors or info.ServerErrors is non-empty, meaning one or more subsystems failed to report their info. The real diagnostic detail is in the per-line 'ERROR:' messages printed just before this aggregate is returned.","triggerScenarios":"Running 'docker info' when the daemon returned partial results: e.g. a plugin failed to load, the builder/registry responded with an error, Swarm could not be reached, or a CLI plugin errored. Each entry in info.ServerErrors/info.ClientErrors is printed, then the function returns this summary error so the CLI exits non-zero.","commonSituations":"Broken or half-installed CLI plugins (info.go:225-231 marks invalid plugins). Daemon with disabled or misconfigured subsystems (logging, builder, registry mirrors). Swarm manager node that lost quorum. Client/plugin version skew where a plugin crashes on load.","solutions":["Read the individual 'ERROR:' lines printed above this message - they name the actual failing component.","Fix or remove the offending CLI plugin (docker plugin ls / docker plugin rm).","For server-side errors, inspect the dockerd logs (journalctl -u docker) for the underlying cause.","If Swarm-related, verify node status with 'docker node ls' and restore quorum.","Re-run 'docker info' after the fix to confirm a clean (zero-error) result."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// When scripting 'docker info', expect a non-zero exit when any subsystem errored.\nout, err := exec.Command(\"docker\", \"info\", \"--format\", \"{{json .}}\").Output()\nif err != nil {\n    // The aggregate 'errors pretty printing info' is expected if subsystems failed;\n    // parse the JSON (if produced) for ServerErrors/ClientErrors rather than failing hard.\n    if len(out) > 0 {\n        var info map[string]any\n        _ = json.Unmarshal(out, &info)\n        // inspect info[\"ServerErrors\"] / info[\"ClientErrors\"]\n    }\n    // treat as soft warning, not fatal, unless critical fields are missing\n}","preventionTips":["Parse 'docker info --format {{json .}}' and inspect ServerErrors/ClientErrors explicitly instead of relying solely on exit code.","Keep CLI plugins healthy: remove broken ones with 'docker plugin rm'.","In CI, tolerate this aggregate error if the specific subsystem you need reports OK.","Watch daemon logs for the root cause behind each per-line ERROR."],"tags":["docker-info","diagnostic","aggregate-error","plugins"],"backgroundTag":null,"analyzedSha":"4f84911bfe8811e9b028e4b1fee8e7510be79387","analyzedAt":"2026-08-07T12:15:29.814Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}