{"id":"4f3810529093bf8c","repo":"docker/cli","slug":"error-reading-content-from-q-v","errorCode":null,"errorMessage":"error reading content from %q: %v","messagePattern":"error reading content from %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/config/create.go","lineNumber":73,"sourceCode":"\t\t\t}\n\t\t},\n\t\tDisableFlagsInUseLine: true,\n\t}\n\tflags := cmd.Flags()\n\tflags.VarP(&createOpts.labels, \"label\", \"l\", \"Config labels\")\n\tflags.StringVar(&createOpts.templateDriver, \"template-driver\", \"\", \"Template driver\")\n\t_ = flags.SetAnnotation(\"template-driver\", \"version\", []string{\"1.37\"})\n\n\treturn cmd\n}\n\n// runCreate creates a config with the given options.\nfunc runCreate(ctx context.Context, dockerCLI command.Cli, options createOptions) error {\n\tapiClient := dockerCLI.Client()\n\n\tconfigData, err := readConfigData(dockerCLI.In(), options.file)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error reading content from %q: %v\", options.file, err)\n\t}\n\n\tspec := swarm.ConfigSpec{\n\t\tAnnotations: swarm.Annotations{\n\t\t\tName:   options.name,\n\t\t\tLabels: opts.ConvertKVStringsToMap(options.labels.GetSlice()),\n\t\t},\n\t\tData: configData,\n\t}\n\tif options.templateDriver != \"\" {\n\t\tspec.Templating = &swarm.Driver{\n\t\t\tName: options.templateDriver,\n\t\t}\n\t}\n\tr, err := apiClient.ConfigCreate(ctx, client.ConfigCreateOptions{\n\t\tSpec: spec,\n\t})\n\tif err != nil {","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/config/create.go#L55-L91","documentation":"Error \"error reading content from %q: %v\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/config/create.go:73 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}