{"record":{"id":"47c9ab29c0656e74","repo":"chenhg5/cc-connect","slug":"chat-id-is-required","errorCode":null,"errorMessage":"chat_id is required","messagePattern":"chat_id is required","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"core/api.go","lineNumber":824,"sourceCode":"\t\treturn\n\t}\n\tif req.ChatID == \"\" || len(req.Bots) < 2 {\n\t\thttp.Error(w, \"chat_id and at least 2 bots are required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\ts.relay.Bind(req.Platform, req.ChatID, req.Bots)\n\tapiJSON(w, http.StatusOK, map[string]string{\"status\": \"ok\"})\n}\n\nfunc (s *APIServer) handleRelayBinding(w http.ResponseWriter, r *http.Request) {\n\tif s.relay == nil {\n\t\thttp.Error(w, \"relay not available\", http.StatusServiceUnavailable)\n\t\treturn\n\t}\n\tchatID := r.URL.Query().Get(\"chat_id\")\n\tif chatID == \"\" {\n\t\thttp.Error(w, \"chat_id is required\", http.StatusBadRequest)\n\t\treturn\n\t}\n\tbinding := s.relay.GetBinding(chatID)\n\tif binding == nil {\n\t\thttp.Error(w, \"no binding found\", http.StatusNotFound)\n\t\treturn\n\t}\n\tapiJSON(w, http.StatusOK, binding)\n}\n","sourceCodeStart":806,"sourceCodeEnd":834,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/core/api.go#L806-L834","documentation":"HTTP 400 validation response from the relay-binding API endpoint: the chat_id query parameter is missing from the GET request, so the relay cannot look up the bot binding for the chat.","triggerScenarios":"Thrown at core/api.go:824 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Append ?chat_id=<id> to the GET request","Verify the chat id matches the one used when binding"],"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-14T00:17:10.932Z"}