{"record":{"id":"ed9b17a02fab0bf5","repo":"chenhg5/cc-connect","slug":"s-app-id-and-app-secret-are-required","errorCode":null,"errorMessage":"%s: app_id and app_secret are required","messagePattern":"(.+?): app_id and app_secret are required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"platform/feishu/feishu.go","lineNumber":335,"sourceCode":"type richCardImageUpload struct {\n\tdone chan struct{}\n}\n\ntype feishuRequestFunc func(client *lark.Client, options ...larkcore.RequestOptionFunc) error\n\nfunc (p *Platform) SetCardNavigationHandler(h core.CardNavigationHandler) {\n\tp.cardNavHandler = h\n}\n\nfunc New(opts map[string]any) (core.Platform, error) {\n\treturn newPlatform(\"feishu\", lark.FeishuBaseUrl, opts)\n}\n\nfunc newPlatform(name, domain string, opts map[string]any) (core.Platform, error) {\n\tappID, _ := opts[\"app_id\"].(string)\n\tappSecret, _ := opts[\"app_secret\"].(string)\n\tif appID == \"\" || appSecret == \"\" {\n\t\treturn nil, fmt.Errorf(\"%s: app_id and app_secret are required\", name)\n\t}\n\tif v, ok := opts[\"domain\"].(string); ok {\n\t\tv = strings.TrimSpace(v)\n\t\tif v != \"\" {\n\t\t\tif _, err := url.ParseRequestURI(v); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"%s: invalid domain %q: %w\", name, v, err)\n\t\t\t}\n\t\t\tdomain = v\n\t\t}\n\t}\n\treactionEmoji, _ := opts[\"reaction_emoji\"].(string)\n\tif reactionEmoji == \"\" {\n\t\treactionEmoji = \"OnIt\"\n\t}\n\tif v, ok := opts[\"reaction_emoji\"].(string); ok && v == \"none\" {\n\t\treactionEmoji = \"\"\n\t}\n\tdoneEmoji, _ := opts[\"done_emoji\"].(string)","sourceCodeStart":317,"sourceCodeEnd":353,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/platform/feishu/feishu.go#L317-L353","documentation":"Startup validation in newPlatform: the Feishu platform adapter cannot authenticate without app_id and app_secret in its options map, so it refuses to construct. Prevents a platform that would fail on every API call from being registered.","triggerScenarios":"Configuring a [[platform]] block with name=\"feishu\" but omitting app_id or app_secret, or providing them as empty strings / non-string types (e.g. numbers).","commonSituations":"Fresh setup before credentials were created in the Feishu open platform; env-var interpolation producing empty strings; typo'd keys (appId vs app_id).","solutions":["Add app_id and app_secret string values to the feishu platform section of config.toml.","Check key spelling: must be exactly app_id and app_secret (snake_case).","Verify the credential source (env var, secrets file) is non-empty at daemon start.","Create an app at open.feishu.cn if you have no credentials yet."],"exampleFix":"// before\n[[platform]]\nname = \"feishu\"\n// after\n[[platform]]\nname = \"feishu\"\n[platform.options]\napp_id = \"cli_xxx\"\napp_secret = \"xxxxx\"","handlingStrategy":"validation","validationCode":"// pre-start check\nif os.Getenv(\"FEISHU_APP_ID\") == \"\" || os.Getenv(\"FEISHU_APP_SECRET\") == \"\" {\n    log.Fatal(\"feishu: app_id/app_secret missing from environment\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run cc-connect doctor before first start.","Keep credentials in env vars or a secrets file sourced before the daemon.","Use exact snake_case keys app_id / app_secret."],"tags":["feishu","config","credentials"],"backgroundTag":"missing-required-config-field","analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}