{"record":{"id":"1adb27268d9d8b52","repo":"chenhg5/cc-connect","slug":"config-attachment-send-must-be-on-or-off","errorCode":null,"errorMessage":"config: attachment_send must be \"on\" or \"off\"","messagePattern":"config: attachment_send must be \"on\" or \"off\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/config.go","lineNumber":1013,"sourceCode":"// validatePermissive is like validate but skips the \"at least one platform\"\n// requirement so that commands like `cc-connect web` can operate on agent-only\n// configs before platforms have been set up.\nfunc (c *Config) validatePermissive() error {\n\treturn c.validateInternal(true)\n}\n\nfunc (c *Config) validate() error {\n\treturn c.validateInternal(false)\n}\n\nfunc (c *Config) validateInternal(permissive bool) error {\n\tif err := validateDisplayConfig(\"display\", &c.Display); err != nil {\n\t\treturn err\n\t}\n\tswitch strings.ToLower(strings.TrimSpace(c.AttachmentSend)) {\n\tcase \"\", \"on\", \"off\":\n\tdefault:\n\t\treturn fmt.Errorf(\"config: attachment_send must be \\\"on\\\" or \\\"off\\\"\")\n\t}\n\tif c.Relay.TimeoutSecs != nil && *c.Relay.TimeoutSecs < 0 {\n\t\treturn fmt.Errorf(\"config: relay.timeout_secs must be >= 0\")\n\t}\n\tswitch strings.ToLower(strings.TrimSpace(c.Relay.Visibility)) {\n\tcase \"\", \"full\", \"summary\", \"none\":\n\tdefault:\n\t\treturn fmt.Errorf(\"config: relay.visibility must be \\\"full\\\", \\\"summary\\\", or \\\"none\\\"\")\n\t}\n\tif len(c.Projects) == 0 {\n\t\treturn fmt.Errorf(\"config: at least one [[projects]] entry is required\")\n\t}\n\tfor i, proj := range c.Projects {\n\t\tprefix := fmt.Sprintf(\"projects[%d]\", i)\n\t\tif proj.Name == \"\" {\n\t\t\treturn fmt.Errorf(\"config: %s.name is required\", prefix)\n\t\t}\n\t\tif proj.Agent.Type == \"\" {","sourceCodeStart":995,"sourceCodeEnd":1031,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/config/config.go#L995-L1031","documentation":"validateInternal rejects attachment_send when set to anything other than \"on\", \"off\", or unset. Fires at config load for typos like \"true\", \"yes\", or \"enable\" — the field is a strict on/off switch, not a boolean.","triggerScenarios":"Thrown at config/config.go:1013 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set attachment_send = \"on\" or \"off\" in config.toml","Remove the key to keep the default (empty = on)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}