zed-industries/zed · error · anyhow::Error

Settings update was canceled

Error message

Settings update was canceled

What it means

Raised in save_llm_provider_form(): the settings update transaction was canceled before it could apply (e.g. the settings write future was dropped or the page changed), so the provider's new API URL and models were not persisted.

Source

Thrown at crates/settings_ui/src/pages/llm_providers_page.rs:1163

                            language_models
                                .anthropic_compatible
                                .get_or_insert_default()
                                .insert(
                                    Arc::from(provider_name.as_str()),
                                    AnthropicCompatibleSettingsContent {
                                        api_url: api_url.clone(),
                                        available_models,
                                        custom_headers: None,
                                    },
                                );
                        }
                    }
                })
            })?;

            settings_update
                .await
                .map_err(|_| anyhow::anyhow!("Settings update was canceled"))??;

            let set_api_key = cx.update(|_window, cx| {
                let provider = LanguageModelRegistry::read_global(cx)
                    .provider(&provider_id)
                    .ok_or_else(|| anyhow::anyhow!("Provider was not registered"))?;
                anyhow::Ok(provider.set_api_key(Some(api_key), cx))
            })??;
            set_api_key.await?;

            cx.update(|window, cx| {
                this.update(cx, |this, cx| {
                    this.provider_configuration_views.remove(&provider_id);
                    this.llm_provider_form = None;
                    this.pop_sub_page(window, cx);
                })
            })??;

            anyhow::Ok(())

View on GitHub (pinned to 5a9b9558db)

Solutions

  1. Retry saving the provider form
  2. Avoid closing the settings page while saving
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/settings_ui/src/pages/llm_providers_page.rs:1153 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@5a9b9558db (2026-08-20). Data as JSON: /api/errors/56d874ac83c57c25. Report an issue: GitHub.