chenhg5/cc-connect · error
err.Error()
Error message
err.Error()
What it means
The API send handler propagated a failure from Engine.SendToSessionWithOptions — the project was resolved, but delivering the message/images/files to the named session failed (unknown session key, agent session error, or attachment processing failure). The underlying error text is returned verbatim as the HTTP error body.
Solutions
- Read the returned error text to identify the underlying session/agent failure
- Verify the session_key exists and its agent session is running
- Fix attachment inputs (valid images/files) if the error mentions media processing
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at core/api.go:257 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/9bca1e90ab02deab.
Report an issue: GitHub.
Appendix: source
Thrown at core/api.go:257
}
s.mu.RUnlock()
if !ok {
if req.Project == "" {
http.Error(w, "project is required (multiple projects configured)", http.StatusBadRequest)
return
}
http.Error(w, fmt.Sprintf("project %q not found", req.Project), http.StatusNotFound)
return
}
workDir := req.WorkDir
if workDir == "" {
workDir = req.CWD
}
if req.Message != "" || len(req.Images) > 0 || len(req.Files) > 0 {
if err := engine.SendToSessionWithOptions(req.SessionKey, req.Message, req.Images, req.Files, SendOptions{WorkDir: workDir, AtUsers: req.AtUsers, AtAll: req.AtAll}); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}
if len(req.Audios) > 0 {
if err := engine.SendAudiosToSession(req.SessionKey, req.Audios); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}
if len(req.Videos) > 0 {
if err := engine.SendVideosToSession(req.SessionKey, req.Videos); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}
View on GitHub (pinned to 4000b2338a)