{"record":{"id":"bd84623f1003b4f2","repo":"rtk-ai/rtk","slug":"no-telemetry-endpoint-configured","errorCode":null,"errorMessage":"no telemetry endpoint configured","messagePattern":"no telemetry endpoint configured","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/telemetry_cmd.rs","lineNumber":252,"sourceCode":"            Ok(()) => {\n                println!(\"Erasure request sent to server.\");\n            }\n            Err(e) => {\n                eprintln!(\"rtk: could not reach server: {}\", e);\n                eprintln!(\"  To complete erasure, email contact@rtk-ai.app\");\n                eprintln!(\"  with your device hash: {}\", hash);\n            }\n        }\n    }\n\n    println!(\"Local telemetry data deleted. Telemetry disabled.\");\n    Ok(())\n}\n\nfn send_erasure_request(device_hash: &str) -> Result<()> {\n    let url = match super::telemetry::endpoint_url() {\n        Some(u) => format!(\"{}/erasure\", u),\n        None => anyhow::bail!(\"no telemetry endpoint configured\"),\n    };\n\n    let payload = serde_json::json!({\n        \"device_hash\": device_hash,\n        \"action\": \"erasure\",\n    });\n\n    let mut req = ureq::post(&url).set(\"Content-Type\", \"application/json\");\n\n    if let Some(token) = option_env!(\"RTK_TELEMETRY_TOKEN\") {\n        req = req.set(\"X-RTK-Token\", token);\n    }\n\n    req.timeout(std::time::Duration::from_secs(5))\n        .send_string(&payload.to_string())?;\n\n    Ok(())\n}","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/rtk-ai/rtk/blob/0924356b4caba4989607227b7c8824d3d8098719/src/core/telemetry_cmd.rs#L234-L270","documentation":"`run_forget` sends a data-erasure request (GDPR-style deletion keyed by device_hash) to RTK's telemetry backend. The endpoint base URL comes from `telemetry::endpoint_url()`, which returns None when no telemetry endpoint is configured, so the erasure request cannot be sent and the command fails with this error.","triggerScenarios":"Running `rtk telemetry forget <device_hash>` (run_forget → send_erasure_request) while no telemetry endpoint URL is set in configuration or environment — e.g. a build without a compiled-in default endpoint and no user override.","commonSituations":"Self-compiled or forked RTK builds lacking the default telemetry endpoint; enterprise/offline installs where the endpoint is intentionally unset; config files that disable or omit telemetry settings.","solutions":["Configure the telemetry endpoint (env var or config key consumed by telemetry::endpoint_url, e.g. RTK_TELEMETRY_ENDPOINT) and re-run the forget command.","If telemetry is intentionally disabled and no data was ever sent, no remote erasure is needed — delete local usage data instead (e.g. remove rtk's SQLite tracking DB).","Check with the RTK maintainers/docs for the correct endpoint value for your build."],"exampleFix":"// before\nrtk telemetry forget <device_hash>\n// error: no telemetry endpoint configured\n\n// after\nexport RTK_TELEMETRY_ENDPOINT=https://telemetry.rtk-ai.example\nrtk telemetry forget <device_hash>","handlingStrategy":"validation","validationCode":"if std::env::var(\"RTK_TELEMETRY_ENDPOINT\").is_err() {\n    eprintln!(\"no telemetry endpoint configured; erasure request cannot be sent\");\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":"match rtk_telemetry_forget(&device_hash).err() {\n    Some(e) if e.to_string().contains(\"no telemetry endpoint configured\") => {\n        eprintln!(\"set RTK_TELEMETRY_ENDPOINT or delete local tracking data instead\");\n    }\n    _ => {}\n}","preventionTips":["Set the telemetry endpoint env/config before running any telemetry subcommands.","In CI, check that required env vars exist before invoking rtk telemetry commands.","If telemetry is intentionally disabled, manage erasure by deleting the local SQLite tracking DB instead."],"tags":["telemetry","missing-config","network","cli"],"backgroundTag":"missing-config-value","analyzedSha":"0924356b4caba4989607227b7c8824d3d8098719","analyzedAt":"2026-09-19T19:25:29.612Z","contentChangedAt":"2026-09-19T19:25:29.612Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}