tailscale/tailscale · error
error sending request: %v
Error message
error sending request: %v
What it means
Returned by SendEvent when the HTTP POST of the session event to the tsrecorder /v2/event endpoint fails at transport level: recorder down, unreachable over the tailnet, timeout, or connection reset mid-request.
Source
Thrown at sessionrecording/connect.go:191
return fmt.Errorf("error checking support for `/v2/event` endpoint: %w", err)
}
if !supported {
return EventAPINotSupportedErr{
ap: ap,
}
}
req, err := http.NewRequestWithContext(ctx, "POST", fmt.Sprintf("http://%s/v2/event", ap.String()), event)
if err != nil {
return fmt.Errorf("error creating request: %w", err)
}
req.Header.Set("Content-Type", "application/json")
resp, err := client.Do(req)
if err != nil {
return fmt.Errorf("error sending request: %v", err)
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
body, err := io.ReadAll(resp.Body)
if err != nil {
// Handle the case where reading the body itself fails
return fmt.Errorf("server returned non-OK status: %s, and failed to read body: %w", resp.Status, err)
}
return fmt.Errorf("server returned non-OK status: %d: %s", resp.StatusCode, string(body))
}
return nil
}
// connectV1 connects to the legacy /record endpoint on the recorder. It is
// used for backwards-compatibility with older tsrecorder instances.View on GitHub (pinned to 6e0912f979)
Solutions
- Check that the tsrecorder node is online and reachable over the tailnet (tailscale ping the recorder addr)
- Verify the tsrecorder process is listening on the expected port and inspect its logs
- Retry the event send; transient network failures are expected and callers like SSH recording retry the connection
- Ensure the local node's outbound connections to the recorder's IP:port are not blocked by ACLs
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at sessionrecording/connect.go:191 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tailscale/tailscale@6e0912f979 (2026-08-18).
Data as JSON: /api/errors/d12e4ee6e234a07d.
Report an issue: GitHub.