{"id":"520fe84a03399f06","repo":"docker/cli","slug":"service-s-w","errorCode":null,"errorMessage":"service %s: %w","messagePattern":"service (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/convert/service.go","lineNumber":44,"sourceCode":"\nconst (\n\tdefaultNetwork = \"default\"\n\t// LabelImage is the label used to store image name provided in the compose file\n\tLabelImage = \"com.docker.stack.image\"\n)\n\n// Services from compose-file types to engine API types\nfunc Services(\n\tctx context.Context,\n\tnamespace Namespace,\n\tconfig *composetypes.Config,\n\tapiClient client.APIClient,\n) (map[string]swarm.ServiceSpec, error) {\n\tresult := make(map[string]swarm.ServiceSpec)\n\tfor _, service := range config.Services {\n\t\tsecrets, err := convertServiceSecrets(ctx, apiClient, namespace, service.Secrets, config.Secrets)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"service %s: %w\", service.Name, err)\n\t\t}\n\t\tconfigs, err := convertServiceConfigObjs(ctx, apiClient, namespace, service, config.Configs)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"service %s: %w\", service.Name, err)\n\t\t}\n\n\t\tserviceSpec, err := Service(namespace, service, config.Networks, config.Volumes, secrets, configs)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"service %s: %w\", service.Name, err)\n\t\t}\n\t\tresult[service.Name] = serviceSpec\n\t}\n\n\treturn result, nil\n}\n\n// Service converts a ServiceConfig into a swarm ServiceSpec\nfunc Service(","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/compose/convert/service.go#L26-L62","documentation":"Error \"service %s: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/compose/convert/service.go:44 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}