{"record":{"id":"eef492cf38364a13","repo":"Billionmail/BillionMail","slug":"error-saving-company-profile-v","errorCode":null,"errorMessage":"error saving company profile: %v","messagePattern":"error saving company profile: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/internal/service/askai/project.go","lineNumber":516,"sourceCode":"\t\tprofile.WebSite = webSite\n\t}\n\tif companyProfile != \"\" {\n\t\tprofile.CompanyProfile = companyProfile\n\t}\n\tif email != \"\" {\n\t\tprofile.Email = email\n\t}\n\tif phone != \"\" {\n\t\tprofile.Phone = phone\n\t}\n\tif supportUrl != \"\" {\n\t\tprofile.SupportUrl = supportUrl\n\t}\n\n\tprofile.UpdateTime = public.GetNowTime()\n\terr = SaveCompanyProfile(Domain, profile)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error saving company profile: %v\", err)\n\t}\n\treturn nil\n}\n\n// GetStyleConfig retrieves the style configuration for a given domain from a JSON file.\nfunc GetStyleConfig(Domain string) (StyleConfig, error) {\n\tfilename := fmt.Sprintf(PRODUCT_CONFIG_PATH+\"/%s/style_config.json\", Domain)\n\tif !public.FileExists(filename) {\n\t\tstyleConfigDefault := StyleConfig{\n\t\t\tAccentColor:         \"#007bff\",           // Default accent color\n\t\t\tTextColor:           \"#000000\",           // Default text color\n\t\t\tPageBackground:      \"#ffffff\",           // Default page background color\n\t\t\tContainerBackground: \"#f8f9fa\",           // Default container background color\n\t\t\tLinkSocialColor:     \"#007bff\",           // Default social link color\n\t\t\tLinkFooterColor:     \"#6c757d\",           // Default footer link color\n\t\t\tHeadingFont:         \"Arial, sans-serif\", // Default heading font\n\t\t\tBodyFont:            \"Arial, sans-serif\", // Default body font\n\t\t\tUpdateTime:          public.GetNowTime(), // Current time as update time","sourceCodeStart":498,"sourceCodeEnd":534,"githubUrl":"https://github.com/Billionmail/BillionMail/blob/fc36c76c050c3775c5e899faf7403cf0262d2744/core/internal/service/askai/project.go#L498-L534","documentation":"Wrap error returned by ModifyCompanyProfile when its call to SaveCompanyProfile fails while persisting the updated profile (name, website, email, phone, support URL) for the domain. The root cause is whatever SaveCompanyProfile hit — typically marshal or filesystem failure — surfaced here with additional 'error saving company profile' context.","triggerScenarios":"Thrown at core/internal/service/askai/project.go:516 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped inner error to identify whether marshal or the file write failed","Ensure the domain config directory exists and is writable before calling ModifyCompanyProfile","Retry after fixing the underlying filesystem issue (permissions, disk space)","Log the domain and updated fields at the call site to make failures reproducible"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}