{"record":{"id":"9da61824c52221eb","repo":"chenhg5/cc-connect","slug":"project-q-not-found-9da618","errorCode":null,"errorMessage":"project %q not found","messagePattern":"project %q not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"core/api.go","lineNumber":247,"sourceCode":"\t\tengine, ok = s.engines[req.Project]\n\t} else if len(s.engines) == 1 {\n\t\t// No project specified and only one engine: use it by default.\n\t\t// Do NOT silently fall back when a non-empty project name is unknown —\n\t\t// that misroutes the message to the wrong engine. Mirrors the resolve\n\t\t// pattern in webhook.go and handleCronAdd.\n\t\tfor _, e := range s.engines {\n\t\t\tengine = e\n\t\t\tok = true\n\t\t}\n\t}\n\ts.mu.RUnlock()\n\n\tif !ok {\n\t\tif req.Project == \"\" {\n\t\t\thttp.Error(w, \"project is required (multiple projects configured)\", http.StatusBadRequest)\n\t\t\treturn\n\t\t}\n\t\thttp.Error(w, fmt.Sprintf(\"project %q not found\", req.Project), http.StatusNotFound)\n\t\treturn\n\t}\n\n\tworkDir := req.WorkDir\n\tif workDir == \"\" {\n\t\tworkDir = req.CWD\n\t}\n\tif req.Message != \"\" || len(req.Images) > 0 || len(req.Files) > 0 {\n\t\tif err := engine.SendToSessionWithOptions(req.SessionKey, req.Message, req.Images, req.Files, SendOptions{WorkDir: workDir, AtUsers: req.AtUsers, AtAll: req.AtAll}); err != nil {\n\t\t\thttp.Error(w, err.Error(), http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\t}\n\n\tif len(req.Audios) > 0 {\n\t\tif err := engine.SendAudiosToSession(req.SessionKey, req.Audios); err != nil {\n\t\t\thttp.Error(w, err.Error(), http.StatusInternalServerError)\n\t\t\treturn","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/core/api.go#L229-L265","documentation":"handleSend could not find an engine registered under the requested project name. Deliberate no-fallback guard (HTTP 404): an explicitly named but unknown project is rejected rather than misrouted to another engine.","triggerScenarios":"Thrown at core/api.go:247 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the project value against the [[project]] names defined in config.toml (exact match)","List available projects via the API if supported, and fix the typo in the caller"],"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-14T05:17:10.506Z"}