{"record":{"id":"257d343ac033d2f9","repo":"geektutu/7days-golang","slug":"no-such-group-257d34","errorCode":null,"errorMessage":"no such group: ","messagePattern":"no such group: ","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"gee-cache/day6-single-flight/geecache/http.go","lineNumber":60,"sourceCode":"// ServeHTTP handle all http requests\nfunc (p *HTTPPool) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\tif !strings.HasPrefix(r.URL.Path, p.basePath) {\n\t\tpanic(\"HTTPPool serving unexpected path: \" + r.URL.Path)\n\t}\n\tp.Log(\"%s %s\", r.Method, r.URL.Path)\n\t// /<basepath>/<groupname>/<key> required\n\tparts := strings.SplitN(r.URL.Path[len(p.basePath):], \"/\", 2)\n\tif len(parts) != 2 {\n\t\thttp.Error(w, \"bad request\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tgroupName := parts[0]\n\tkey := parts[1]\n\n\tgroup := GetGroup(groupName)\n\tif group == nil {\n\t\thttp.Error(w, \"no such group: \"+groupName, http.StatusNotFound)\n\t\treturn\n\t}\n\n\tview, err := group.Get(key)\n\tif err != nil {\n\t\thttp.Error(w, err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/octet-stream\")\n\tw.Write(view.ByteSlice())\n}\n\n// Set updates the pool's list of peers.\nfunc (p *HTTPPool) Set(peers ...string) {\n\tp.mu.Lock()\n\tdefer p.mu.Unlock()\n\tp.peers = consistenthash.New(defaultReplicas, nil)","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/geektutu/7days-golang/blob/cf3644382101dc13e7fd92e8f5c66cabc51bcd3b/gee-cache/day6-single-flight/geecache/http.go#L42-L78","documentation":"HTTP 404 response in HTTPPool.ServeHTTP: the group name from the URL path is not registered (GetGroup returns nil), so this node hosts no such cache group. It fires for peer requests naming an unknown group.","triggerScenarios":"Thrown at gee-cache/day6-single-flight/geecache/http.go:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Register the group on every peer so group names match across nodes (gee.RegisterPeers / NewGroup with the same name).","Verify the group name in the request URL matches the registered group exactly.","Return the request from a node that actually hosts the group."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"cf3644382101dc13e7fd92e8f5c66cabc51bcd3b","analyzedAt":"2026-09-03T18:31:24.087Z","contentChangedAt":"2026-09-03T18:31:24.087Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}