fix: don't error on failure to fetch privacy settings (#4799)

* fix: dont error on failure to fetch privacy settings

* Add console warning when we ignore it

---------

Co-authored-by: Tom Pridham <pridham.tom@gmail.com>
This commit is contained in:
Jonathan Tran
2024-12-23 11:44:15 -05:00
committed by GitHub
parent bb51646738
commit 70b8541038

View File

@ -308,7 +308,7 @@ pub async fn kcl_lsp_run(
let mut zoo_client = kittycad::Client::new(token);
zoo_client.set_base_url(baseurl.as_str());
// Check if we can send telememtry for this user.
// Check if we can send telemetry for this user.
let can_send_telemetry = match zoo_client.users().get_privacy_settings().await {
Ok(privacy_settings) => privacy_settings.can_train_on_data,
Err(err) => {
@ -319,7 +319,8 @@ pub async fn kcl_lsp_run(
{
true
} else {
return Err(err.to_string().into());
web_sys::console::warn_1(&format!("Failed to get privacy settings: {err:?}").into());
false
}
}
};