{"record":{"id":"a499d6c9f0a8eaf1","repo":"wasmerio/wasmer","slug":"cannot-update-secret-in-app-app-id-as-it-do","errorCode":null,"errorMessage":"Cannot update secret '{}' in app {app_id} as it does not exist yet. Use the `create` command instead.","messagePattern":"Cannot update secret '(.+?)' in app (.+?) as it does not exist yet\\. Use the `create` command instead\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/cli/src/commands/app/secrets/update.rs","lineNumber":111,"sourceCode":"    /// Given a list of secrets, checks if the given secrets already exist for the given app and\n    /// returns a list of secrets that must be upserted.\n    async fn filter_secrets(\n        &self,\n        client: &WasmerClient,\n        app_id: &str,\n        secrets: Vec<Secret>,\n    ) -> anyhow::Result<Vec<Secret>> {\n        let names = secrets.iter().map(|s| &s.name);\n        let app_secrets =\n            wasmer_backend_api::query::get_all_app_secrets_filtered(client, app_id, names).await?;\n        let sset = HashSet::<&str>::from_iter(app_secrets.iter().map(|s| s.name.as_str()));\n\n        let mut ret = vec![];\n\n        for secret in secrets {\n            if !sset.contains(secret.name.as_str()) {\n                if self.non_interactive {\n                    anyhow::bail!(\n                        \"Cannot update secret '{}' in app {app_id} as it does not exist yet. Use the `create` command instead.\",\n                        secret.name.bold()\n                    );\n                } else {\n                    eprintln!(\n                        \"Secret '{}' does not exist for the selected app.\",\n                        secret.name.bold()\n                    );\n                    let theme = ColorfulTheme::default();\n                    let res = dialoguer::Confirm::with_theme(&theme)\n                        .with_prompt(\"Do you want to create it?\")\n                        .interact()?;\n\n                    if !res {\n                        eprintln!(\n                            \"Cannot update secret '{}' as it does not exist yet. Use the `create` command instead.\",\n                            secret.name.bold()\n                        );","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/cli/src/commands/app/secrets/update.rs#L93-L129","documentation":"Error \"Cannot update secret '{}' in app {app_id} as it does not exist yet. Use the `create` command instead.\" thrown in wasmerio/wasmer.","triggerScenarios":"Thrown at lib/cli/src/commands/app/secrets/update.rs:111 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}