{"record":{"id":"591c74da5d22eb58","repo":"geektutu/7days-golang","slug":"no-such-group-591c74","errorCode":null,"errorMessage":"no such group: ","messagePattern":"no such group: ","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"gee-cache/day7-proto-buf/geecache/http.go","lineNumber":63,"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\t// Write the value to the response body as a proto message.\n\tbody, err := proto.Marshal(&pb.Response{Value: view.ByteSlice()})\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(body)","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/geektutu/7days-golang/blob/cf3644382101dc13e7fd92e8f5c66cabc51bcd3b/gee-cache/day7-proto-buf/geecache/http.go#L45-L81","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/day7-proto-buf/geecache/http.go:63 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Register the group on every peer so group names match across nodes.","Verify the group name in the request URL matches the registered group exactly.","Route the request to a node that 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"}