{"record":{"id":"6180ca9f1f6bf04e","repo":"chenhg5/cc-connect","slug":"tuitui-platform-not-found-in-project-q","errorCode":null,"errorMessage":"tuitui platform not found in project %q","messagePattern":"tuitui platform not found in project %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cc-connect/tuitui.go","lineNumber":389,"sourceCode":"\nvar errTuiTuiUsage = errors.New(\"show tuitui usage\")\n\nfunc loadTuiTuiPlatform(opts tuituiCLIOptions) (*tuitui.Platform, error) {\n\tplatformOpts := map[string]any{}\n\tif opts.configPath != \"\" {\n\t\tcfg, err := config.Load(opts.configPath)\n\t\tif err != nil {\n\t\t\tif opts.configSet {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t} else {\n\t\t\tvar found bool\n\t\t\tplatformOpts, found, err = findTuiTuiOptions(cfg, opts)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif opts.project != \"\" && !found {\n\t\t\t\treturn nil, fmt.Errorf(\"tuitui platform not found in project %q\", opts.project)\n\t\t\t}\n\t\t}\n\t}\n\tif opts.appID != \"\" {\n\t\tplatformOpts[\"app_id\"] = opts.appID\n\t}\n\tif opts.appSecret != \"\" {\n\t\tplatformOpts[\"app_secret\"] = opts.appSecret\n\t}\n\tif opts.apiBase != \"\" {\n\t\tplatformOpts[\"api_base\"] = opts.apiBase\n\t}\n\tif platformOpts[\"app_id\"] == nil || platformOpts[\"app_id\"] == \"\" {\n\t\tplatformOpts[\"app_id\"] = os.Getenv(\"TUITUI_APP_ID\")\n\t}\n\tif platformOpts[\"app_secret\"] == nil || platformOpts[\"app_secret\"] == \"\" {\n\t\tplatformOpts[\"app_secret\"] = os.Getenv(\"TUITUI_APP_SECRET\")\n\t}","sourceCodeStart":371,"sourceCodeEnd":407,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/cmd/cc-connect/tuitui.go#L371-L407","documentation":"loadTuiTuiPlatform looks up the tuitui platform section in the config. When --project is explicitly given but that project either doesn't exist or has no tuitui platform entry, findTuiTuiOptions returns found=false and this error names the project string. Distinguishes an explicit-but-wrong project selection from the ambiguous case (error 448).","triggerScenarios":"`--project myproj` where config.toml has no [projects.myproj.platforms.tuitui] (or equivalent tuitui platform block), in runTuiTuiMessages/runTuiTuiPost via loadTuiTuiPlatform.","commonSituations":"Typo in project name; project renamed/removed in config; expecting tuitui to be configured in a project that only has feishu/telegram platforms; wrong --config path pointing at a different file.","solutions":["List projects in your config.toml and verify the tuitui platform block exists under the named project","Fix the --project spelling to match the config key exactly","Verify --config points at the intended config file","Add a tuitui platform section to the project if it is missing"],"exampleFix":"// before (config lacks tuitui under myproj)\n[projects.myproj]\n# only feishu configured\n// after\n[projects.myproj.platforms.tuitui]\napp_id = \"cli_xxx\"\napp_secret = \"...\"","handlingStrategy":"validation","validationCode":"cfg, _ := config.Load(path)\nproj, ok := cfg.Projects[projectName]\nif !ok || !hasPlatform(proj, \"tuitui\") {\n\treturn fmt.Errorf(\"project %q has no tuitui platform\", projectName)\n}","typeGuard":null,"tryCatchPattern":"cli, err := loadTuiTuiPlatform(opts)\nif err != nil {\n\tif strings.Contains(err.Error(), \"not found in project\") {\n\t\tslog.Warn(\"check --project name and config.toml\", \"err\", err)\n\t}\n\treturn err\n}","preventionTips":["Keep --project values in sync with config keys","Verify the tuitui platform block exists before automating","Point --config at the right file in multi-env setups"],"tags":["config","cli","tuitui"],"backgroundTag":"resource-not-found","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"}