{"record":{"id":"22462636c3c81ce2","repo":"Billionmail/BillionMail","slug":"failed-to-convert-overview-data-v","errorCode":null,"errorMessage":"failed to convert overview data: %v","messagePattern":"failed to convert overview data: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/internal/controller/batch_mail/batch_mail_v1_task_stat_chart.go","lineNumber":39,"sourceCode":"\t\tres.Code = 500\n\t\tres.SetError(gerror.New(public.LangCtx(ctx, \"Failed to get task information: {}\", err.Error())))\n\t\treturn\n\t}\n\n\tif taskInfo == nil || taskInfo.Id == 0 {\n\t\tres.Code = 404\n\t\tres.SetError(gerror.New(public.LangCtx(ctx, \"Task not found: {}\", req.TaskId)))\n\t\treturn\n\t}\n\n\t// reuse the maillog_stat service to get the overview\n\toverview := maillog_stat.NewOverview()\n\toverviewMap := overview.Overview(req.TaskId, req.Domain, req.StartTime, req.EndTime)\n\n\terr = gconv.Struct(overviewMap, &res.Data)\n\n\tif err != nil {\n\t\terr = fmt.Errorf(\"failed to convert overview data: %v\", err)\n\t\treturn\n\t}\n\n\t//statService := batch_mail.NewTaskStatService()\n\t//\n\t//chartData := statService.GetTaskStatChart(req.TaskId, req.Domain, req.StartTime, req.EndTime)\n\t//\n\t//res.Data.Dashboard = chartData[\"dashboard\"]\n\t//res.Data.MailProviders = chartData[\"mail_providers\"]\n\t//res.Data.SendMailChart = chartData[\"send_mail_chart\"]\n\t//res.Data.BounceRateChart = chartData[\"bounce_rate_chart\"]\n\t//res.Data.OpenRateChart = chartData[\"open_rate_chart\"]\n\t//res.Data.ClickRateChart = chartData[\"click_rate_chart\"]\n\n\tres.SetSuccess(public.LangCtx(ctx, \"Task statistics retrieved successfully\"))\n\treturn\n}\n","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/Billionmail/BillionMail/blob/fc36c76c050c3775c5e899faf7403cf0262d2744/core/internal/controller/batch_mail/batch_mail_v1_task_stat_chart.go#L21-L57","documentation":"rebuildPostfixServiceNetworks1 found the 'services' mapping but no map entry named 'postfix-billionmail', so it cannot rebuild the Postfix service's network config. Message wording differs from error 403 but the condition is identical.","triggerScenarios":"services exists in dockerConfig but contains no 'postfix-billionmail' mapping: service renamed, defined only in an unmerged override file, or the wrong file was parsed.","commonSituations":"Custom compose files with a renamed mail service; forgetting `docker compose config` merge semantics when only the base file is loaded; typos.","solutions":["Add/restore a service named exactly 'postfix-billionmail' in the compose file being parsed","Merge override files into the config before calling the rebuild","Adapt the hardcoded service key in config_manager.go if renaming intentionally","Log the keys of dockerConfig[\"services\"] to confirm what the parser produced"],"exampleFix":"// before\nservices:\n  postfix: {image: billionmail/postfix}\n// after\nservices:\n  postfix-billionmail: {image: billionmail/postfix}","handlingStrategy":"validation","validationCode":"services, _ := dockerConfig[\"services\"].(map[string]interface{})\nif _, ok := services[\"postfix-billionmail\"]; !ok {\n\treturn fmt.Errorf(\"cannot rebuild: postfix-billionmail absent\")\n}","typeGuard":"func hasPostfixService(cfg map[string]interface{}) bool {\n\tsvc, _ := cfg[\"services\"].(map[string]interface{})\n\t_, ok := svc[\"postfix-billionmail\"]\n\treturn ok\n}","tryCatchPattern":"if err := m.rebuildPostfixServiceNetworks1(dockerConfig, configs); err != nil {\n\tif strings.Contains(err.Error(), \"configuration does not exist\") {\n\t\t// restore or merge the service definition, then retry\n\t}\n\treturn err\n}","preventionTips":["Keep the postfix-billionmail key canonical across base and override compose files","Run merged-config validation ('docker compose config') before programmatic rebuilds","Alert on diffs that rename or delete the mail service in deployment repos","Add a preflight grep for the service name in the file being loaded"],"tags":["docker-compose","multi-ip","yaml","service-key"],"backgroundTag":"service-not-found-in-compose","analyzedSha":"fc36c76c050c3775c5e899faf7403cf0262d2744","analyzedAt":"2026-09-05T21:28:54.019Z","contentChangedAt":"2026-09-05T21:28:54.019Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}