wasmerio/wasmer · error

Cannot update secret '{}' in app {app_id} as it does not exi

Error message

Cannot update secret '{}' in app {app_id} as it does not exist yet. Use the `create` command instead.

What it means

Error "Cannot update secret '{}' in app {app_id} as it does not exist yet. Use the `create` command instead." thrown in wasmerio/wasmer.

Source

Thrown at lib/cli/src/commands/app/secrets/update.rs:111

    /// Given a list of secrets, checks if the given secrets already exist for the given app and
    /// returns a list of secrets that must be upserted.
    async fn filter_secrets(
        &self,
        client: &WasmerClient,
        app_id: &str,
        secrets: Vec<Secret>,
    ) -> anyhow::Result<Vec<Secret>> {
        let names = secrets.iter().map(|s| &s.name);
        let app_secrets =
            wasmer_backend_api::query::get_all_app_secrets_filtered(client, app_id, names).await?;
        let sset = HashSet::<&str>::from_iter(app_secrets.iter().map(|s| s.name.as_str()));

        let mut ret = vec![];

        for secret in secrets {
            if !sset.contains(secret.name.as_str()) {
                if self.non_interactive {
                    anyhow::bail!(
                        "Cannot update secret '{}' in app {app_id} as it does not exist yet. Use the `create` command instead.",
                        secret.name.bold()
                    );
                } else {
                    eprintln!(
                        "Secret '{}' does not exist for the selected app.",
                        secret.name.bold()
                    );
                    let theme = ColorfulTheme::default();
                    let res = dialoguer::Confirm::with_theme(&theme)
                        .with_prompt("Do you want to create it?")
                        .interact()?;

                    if !res {
                        eprintln!(
                            "Cannot update secret '{}' as it does not exist yet. Use the `create` command instead.",
                            secret.name.bold()
                        );

View on GitHub (pinned to 8c4b9ee9d3)

When it happens

Trigger: Thrown at lib/cli/src/commands/app/secrets/update.rs:111 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of wasmerio/wasmer@8c4b9ee9d3 (2026-09-01). Data as JSON: /api/errors/a499d6c9f0a8eaf1. Report an issue: GitHub.