multica-ai/multica · error

icon cannot contain tabs, newlines, or control characters

Error message

icon cannot contain tabs, newlines, or control characters

What it means

Validation guard in validatePropertyIcon: the raw icon string contained a Unicode control character (tab, newline, etc.) before trimming. The icon value is meant to be a plain icon key rendered in the UI, so control characters are rejected outright.

Solutions

  1. Remove tabs, newlines, and control characters from the icon value.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/internal/handler/property.go:205 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/24959f5b47c32ea5. Report an issue: GitHub.

Appendix: source

Thrown at server/internal/handler/property.go:205

		}
	}
	name := strings.TrimSpace(raw)
	if name == "" {
		return "", errors.New("name is required")
	}
	if utf8.RuneCountInString(name) > maxPropertyNameLen {
		return "", fmt.Errorf("name must be %d characters or fewer", maxPropertyNameLen)
	}
	if _, reserved := reservedPropertyNames[normalizePropertyName(name)]; reserved {
		return "", fmt.Errorf("%q is reserved for a built-in issue field", name)
	}
	return name, nil
}

func validatePropertyIcon(raw string) (string, error) {
	for _, r := range raw {
		if unicode.IsControl(r) {
			return "", errors.New("icon cannot contain tabs, newlines, or control characters")
		}
	}
	icon := strings.TrimSpace(raw)
	if utf8.RuneCountInString(icon) > maxPropertyIconLen {
		return "", fmt.Errorf("icon must be %d characters or fewer", maxPropertyIconLen)
	}
	if icon == "" {
		return "", nil
	}
	if _, ok := validPropertyIcons[icon]; !ok {
		return "", errors.New("icon must be a supported icon key")
	}
	return icon, nil
}

func validatePropertyType(t string) error {
	for _, v := range validPropertyTypes {
		if t == v {

View on GitHub (pinned to 2c0912b6ec)