chenhg5/cc-connect · error

no binding found

Error message

no binding found

What it means

HTTP 404 response from the relay-binding API endpoint: a chat_id was supplied but relay.GetBinding returned nil, meaning no bots have been bound to that chat yet.

Source

Thrown at core/api.go:829

	}

	s.relay.Bind(req.Platform, req.ChatID, req.Bots)
	apiJSON(w, http.StatusOK, map[string]string{"status": "ok"})
}

func (s *APIServer) handleRelayBinding(w http.ResponseWriter, r *http.Request) {
	if s.relay == nil {
		http.Error(w, "relay not available", http.StatusServiceUnavailable)
		return
	}
	chatID := r.URL.Query().Get("chat_id")
	if chatID == "" {
		http.Error(w, "chat_id is required", http.StatusBadRequest)
		return
	}
	binding := s.relay.GetBinding(chatID)
	if binding == nil {
		http.Error(w, "no binding found", http.StatusNotFound)
		return
	}
	apiJSON(w, http.StatusOK, binding)
}

View on GitHub (pinned to 4000b2338a)

Solutions

  1. Create the binding first via the relay bind endpoint with that chat_id
  2. Double-check the chat_id for typos against the bound chats
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at core/api.go:829 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/1131d2df1a324e03. Report an issue: GitHub.