Billionmail/BillionMail · error

error saving company profile: %v

Error message

error saving company profile: %v

What it means

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.

Source

Thrown at core/internal/service/askai/project.go:516

		profile.WebSite = webSite
	}
	if companyProfile != "" {
		profile.CompanyProfile = companyProfile
	}
	if email != "" {
		profile.Email = email
	}
	if phone != "" {
		profile.Phone = phone
	}
	if supportUrl != "" {
		profile.SupportUrl = supportUrl
	}

	profile.UpdateTime = public.GetNowTime()
	err = SaveCompanyProfile(Domain, profile)
	if err != nil {
		return fmt.Errorf("error saving company profile: %v", err)
	}
	return nil
}

// GetStyleConfig retrieves the style configuration for a given domain from a JSON file.
func GetStyleConfig(Domain string) (StyleConfig, error) {
	filename := fmt.Sprintf(PRODUCT_CONFIG_PATH+"/%s/style_config.json", Domain)
	if !public.FileExists(filename) {
		styleConfigDefault := StyleConfig{
			AccentColor:         "#007bff",           // Default accent color
			TextColor:           "#000000",           // Default text color
			PageBackground:      "#ffffff",           // Default page background color
			ContainerBackground: "#f8f9fa",           // Default container background color
			LinkSocialColor:     "#007bff",           // Default social link color
			LinkFooterColor:     "#6c757d",           // Default footer link color
			HeadingFont:         "Arial, sans-serif", // Default heading font
			BodyFont:            "Arial, sans-serif", // Default body font
			UpdateTime:          public.GetNowTime(), // Current time as update time

View on GitHub (pinned to fc36c76c05)

Solutions

  1. Inspect the wrapped inner error to identify whether marshal or the file write failed
  2. Ensure the domain config directory exists and is writable before calling ModifyCompanyProfile
  3. Retry after fixing the underlying filesystem issue (permissions, disk space)
  4. Log the domain and updated fields at the call site to make failures reproducible
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at core/internal/service/askai/project.go:516 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Billionmail/BillionMail@fc36c76c05 (2026-09-05). Data as JSON: /api/errors/eef492cf38364a13. Report an issue: GitHub.