Skip to content

Commit

Permalink
fix: don't error on failure to fetch privacy settings (#4799)
Browse files Browse the repository at this point in the history
* fix: dont error on failure to fetch privacy settings

* Add console warning when we ignore it

---------

Co-authored-by: Tom Pridham <[email protected]>
  • Loading branch information
jtran and TomPridham authored Dec 23, 2024
1 parent bb51646 commit 70b8541
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/wasm-lib/src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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
}
}
};
Expand Down

0 comments on commit 70b8541

Please sign in to comment.