{"record":{"id":"6b0fe15744ef4602","repo":"juanfont/headscale","slug":"unknown-or-expired-ping","errorCode":null,"errorMessage":"unknown or expired ping","messagePattern":"unknown or expired ping","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"hscontrol/noise.go","lineNumber":334,"sourceCode":"func (h *Headscale) PingResponseHandler(\n\twriter http.ResponseWriter,\n\treq *http.Request,\n) {\n\tif req.Method != http.MethodHead {\n\t\thttp.Error(writer, \"method not allowed\", http.StatusMethodNotAllowed)\n\t\treturn\n\t}\n\n\tpingID := req.URL.Query().Get(\"id\")\n\tif pingID == \"\" {\n\t\thttp.Error(writer, \"missing ping ID\", http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tif h.state.CompletePing(pingID) {\n\t\twriter.WriteHeader(http.StatusOK)\n\t} else {\n\t\thttp.Error(writer, \"unknown or expired ping\", http.StatusNotFound)\n\t}\n}\n\nfunc stringParam(req *http.Request, key string) (string, error) {\n\tparam := chi.URLParam(req, key)\n\tif param == \"\" {\n\t\treturn \"\", fmt.Errorf(\"%w: %s\", ErrMissingURLParameter, key)\n\t}\n\n\treturn param, nil\n}\n\nfunc nodeIDParam(req *http.Request, key string) (types.NodeID, error) {\n\tparam := chi.URLParam(req, key)\n\tif param == \"\" {\n\t\treturn 0, fmt.Errorf(\"%w: %s\", ErrMissingURLParameter, key)\n\t}\n","sourceCodeStart":316,"sourceCodeEnd":352,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/hscontrol/noise.go#L316-L352","documentation":"Error \"unknown or expired ping\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at hscontrol/noise.go:334 when the library encounters an invalid state.","commonSituations":"The ping ID is unknown or has expired. Re-initiate the ping handshake; expired entries are pruned from the session cache.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (unknown or expired ping); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (unknown or expired ping); retry the operation after fixing the input, configuration, or environment.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}