{"record":{"id":"e9e01d726fae132b","repo":"tailscale/tailscale","slug":"initial-fetch-failed-d-200s","errorCode":null,"errorMessage":"initial fetch failed %d: %.200s","messagePattern":"initial fetch failed (.+?): %\\.200s","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"control/controlclient/direct.go","lineNumber":1187,"sourceCode":"\t\t}\n\t}()\n\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", url, bytes.NewReader(bodyData))\n\tif err != nil {\n\t\treturn err\n\t}\n\tts2021.AddLBHeader(req, nodeKey)\n\n\tres, err := httpc.Do(req)\n\tif err != nil {\n\t\tvlogf(\"netmap: Do: %v\", err)\n\t\treturn err\n\t}\n\tvlogf(\"netmap: Do = %v after %v\", res.StatusCode, time.Since(t0).Round(time.Millisecond))\n\tif res.StatusCode != 200 {\n\t\tmsg, _ := io.ReadAll(res.Body)\n\t\tres.Body.Close()\n\t\treturn fmt.Errorf(\"initial fetch failed %d: %.200s\",\n\t\t\tres.StatusCode, strings.TrimSpace(string(msg)))\n\t}\n\tdefer res.Body.Close()\n\n\tc.health.NoteMapRequestHeard(request)\n\twatchdogTimer.Reset(watchdogTimeout)\n\n\tif nu == nil {\n\t\tio.Copy(io.Discard, res.Body)\n\t\treturn nil\n\t}\n\n\tif isStreaming && c.streamingMapSession != nil {\n\t\tpanic(\"mapSession is already set\")\n\t}\n\n\tsess := newMapSession(persist.PrivateNodeKey(), nu, c.controlKnobs)\n\tif isStreaming {","sourceCodeStart":1169,"sourceCodeEnd":1205,"githubUrl":"https://github.com/tailscale/tailscale/blob/5201273aec737d6372ab7423c31c04ca3ca2a0c2/control/controlclient/direct.go#L1169-L1205","documentation":"Raised in the map request when the initial POST to /machine/map responds with a non-200 status. The status and truncated body are included; control refused to start the map session, commonly due to an expired or unknown node key.","triggerScenarios":"Thrown at control/controlclient/direct.go:1236 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry with backoff","Re-authenticate if the server reports the node is unknown"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5201273aec737d6372ab7423c31c04ca3ca2a0c2","analyzedAt":"2026-08-18T08:17:25.280Z","contentChangedAt":"2026-08-18T08:17:25.280Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}