{"id":"f3ff3445433d0837","repo":"docker/cli","slug":"undefined-config-q","errorCode":null,"errorMessage":"undefined config %q","messagePattern":"undefined config %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/convert/service.go","lineNumber":302,"sourceCode":"// and a set of compose Config specs, and creates the swarm ConfigReferences\n// required by the service. Unlike convertServiceSecrets, this takes the whole\n// ServiceConfig, because some Configs may be needed as a result of other\n// fields (like CredentialSpecs).\n//\n// TODO: fix configs API so that ConfigsAPIClient is not required here\nfunc convertServiceConfigObjs(\n\tctx context.Context,\n\tapiClient client.ConfigAPIClient,\n\tnamespace Namespace,\n\tservice composetypes.ServiceConfig,\n\tconfigSpecs map[string]composetypes.ConfigObjConfig,\n) ([]*swarm.ConfigReference, error) {\n\trefs := []*swarm.ConfigReference{}\n\n\tlookup := func(key string) (composetypes.FileObjectConfig, error) {\n\t\tconfigSpec, exists := configSpecs[key]\n\t\tif !exists {\n\t\t\treturn composetypes.FileObjectConfig{}, fmt.Errorf(\"undefined config %q\", key)\n\t\t}\n\t\treturn composetypes.FileObjectConfig(configSpec), nil\n\t}\n\tfor _, config := range service.Configs {\n\t\tobj, err := convertFileObject(namespace, composetypes.FileReferenceConfig(config), lookup)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tfile := swarm.ConfigReferenceFileTarget(obj.File)\n\t\trefs = append(refs, &swarm.ConfigReference{\n\t\t\tFile:       &file,\n\t\t\tConfigName: obj.Name,\n\t\t})\n\t}\n\n\t// finally, after converting all file objects, create any\n\t// Runtime-type configs that are needed. these are configs that are not","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/compose/convert/service.go#L284-L320","documentation":"Error \"undefined config %q\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/compose/convert/service.go:302 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}