wavetermdev/waveterm · warning
wcloud endpoint not set
Error message
wcloud endpoint not set
What it means
wcloud's makeAnonPostReq builds an HTTP request but first checks GetEndpoint(); if the wcloud endpoint configuration is empty (""), it refuses to make the call and returns this error. It prevents anonymous telemetry/event posts from being sent to a bogus relative URL. Callers include sendTEventsBatch, sendTelemetry, and SendNoTelemetryUpdate.
Source
Thrown at pkg/wcloud/wcloud.go:93
if !wavebase.IsDevMode() {
return WCloudEndpoint
}
endpoint := WCloudEndpoint_VarCache
return endpoint
}
func GetPingEndpoint() string {
if !wavebase.IsDevMode() {
return WCloudPingEndpoint
}
endpoint := WCloudPingEndpoint_VarCache
return endpoint
}
func makeAnonPostReq(ctx context.Context, apiUrl string, data interface{}) (*http.Request, error) {
endpoint := GetEndpoint()
if endpoint == "" {
return nil, errors.New("wcloud endpoint not set")
}
var dataReader io.Reader
if data != nil {
byteArr, err := json.Marshal(data)
if err != nil {
return nil, fmt.Errorf("error marshaling json for %s request: %v", apiUrl, err)
}
dataReader = bytes.NewReader(byteArr)
}
fullUrl := GetEndpoint() + apiUrl
req, err := http.NewRequestWithContext(ctx, "POST", fullUrl, dataReader)
if err != nil {
return nil, fmt.Errorf("error creating %s request: %v", apiUrl, err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-PromptAPIVersion", strconv.Itoa(APIVersion))
req.Header.Set("X-PromptAPIUrl", apiUrl)
req.Close = trueView on GitHub (pinned to a4447c1563)
Solutions
- Check GetEndpoint() before sending and skip telemetry calls when empty — treat unset endpoint as 'telemetry disabled'.
- Set the wcloud endpoint configuration value to the correct URL for your environment.
- If telemetry should be disabled, gate the calling code on the config flag instead of letting it error.
- Verify no config migration/reset wiped the endpoint key.
Example fix
// before
err := wcloud.SendTelemetry(telemetryData)
if err != nil {
return err
}
// after
if wcloud.GetEndpoint() == "" {
return nil // telemetry disabled
}
err := wcloud.SendTelemetry(telemetryData)
if err != nil {
return err
} Defensive patterns
Strategy: fallback
Validate before calling
if wcloud.GetEndpoint() == "" {
// endpoint unset: telemetry disabled
return nil
} Try / catch
err := wcloud.SendTelemetry(data)
if err != nil && strings.Contains(err.Error(), "wcloud endpoint not set") {
log.Printf("telemetry skipped: endpoint not configured")
return nil // non-fatal
}
if err != nil {
return err
} Prevention
- Gate all telemetry calls on GetEndpoint() != "" at startup.
- Treat unset endpoint as intentional telemetry-disable, not a failure.
- Include the endpoint value in deployment config checklists/health checks.
- Send telemetry asynchronously so a misconfiguration never blocks the main flow.
When it happens
Trigger: Calling wcloud telemetry APIs (SendTelemetry, SendTEventsBatch, SendNoTelemetryUpdate) when the endpoint config value is unset, empty string, or explicitly cleared (often used intentionally to disable telemetry).
Common situations: Fresh installs with no wcloud endpoint configured; dev/offline builds; ops intentionally blanking the endpoint to disable cloud telemetry; config migrations dropping the endpoint key.
Understand the failure class
Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.
Related errors
- wcloud ping endpoint not set
- cannot call ${methodName}: no web endpoint
- call ${methodName} failed: ${resp.status} ${resp.statusText}
- Failed to fetch config: ${configResponse.statusText}
- Failed to fetch data: ${dataResponse.statusText}
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/beff76c8bc7534c0.
Report an issue: GitHub.