{"record":{"id":"3d0a15c324c427ea","repo":"warpdotdev/warp","slug":"auth-secret-type-is-not-supported-via-the-har","errorCode":null,"errorMessage":"Auth secret type {:?} is not supported via the harness FTUX flow","messagePattern":"Auth secret type (.+?) is not supported via the harness FTUX flow","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/ai/auth_secret_types.rs","lineNumber":93,"sourceCode":"            };\n            Ok(ManagedSecretValue::anthropic_bedrock_access_key(\n                field_values[0].clone(),\n                field_values[1].clone(),\n                session_token,\n                field_values[3].clone(),\n            ))\n        }\n        ManagedSecretType::OpenaiApiKey => {\n            let base_url = field_values\n                .get(1)\n                .map(|s| s.trim().to_owned())\n                .filter(|s| !s.is_empty());\n            Ok(ManagedSecretValue::openai_api_key(\n                field_values[0].clone(),\n                base_url,\n            ))\n        }\n        ManagedSecretType::RawValue | ManagedSecretType::Dotenvx => Err(anyhow!(\n            \"Auth secret type {:?} is not supported via the harness FTUX flow\",\n            info.secret_type\n        )),\n    }\n}\n\nstatic CODEX_AUTH_SECRET_TYPES: [AuthSecretTypeInfo; 1] = [AuthSecretTypeInfo {\n    display_name: \"OpenAI API Key\",\n    secret_type: ManagedSecretType::OpenaiApiKey,\n    learn_more_url: CODEX_LEARN_MORE_URL,\n    fields: &[\n        AuthSecretTypeField {\n            label: \"OPENAI_API_KEY\",\n            placeholder: Some(\"sk-...\"),\n            optional: false,\n            sensitive: true,\n        },\n        AuthSecretTypeField {","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/auth_secret_types.rs#L75-L111","documentation":"build_managed_secret_value only constructs ManagedSecretValue for the concretely-shaped harness secret types (Anthropic/Bedrock/OpenAI API keys, etc.). ManagedSecretType::RawValue and ManagedSecretType::Dotenvx are explicitly rejected because the harness FTUX (first-time UX) flow has no form definition for them.","triggerScenarios":"Routing a secret whose info.secret_type is ManagedSecretType::RawValue or ManagedSecretType::Dotenvx into build_managed_secret_value - e.g. enumerating all ManagedSecretType variants generically and feeding each into the FTUX flow (auth_secret_types.rs:93-96).","commonSituations":"New ManagedSecretType variants added without deciding FTUX support; code that builds the type list from a server enum instead of the curated CODEX_AUTH_SECRET_TYPES/CLAUDE-style static lists.","solutions":["Drive the FTUX picker from curated static lists (e.g. CODEX_AUTH_SECRET_TYPES) rather than enumerating ManagedSecretType","Match exhaustively on ManagedSecretType before calling and route RawValue/Dotenvx to their own flows","When adding a secret type, extend the match arm and the curated list together"],"exampleFix":"// before\nfor info in all_secret_type_infos() {\n    let v = build_managed_secret_value(&info, &values)?; // may hit RawValue/Dotenvx\n}\n\n// after\nfn ftux_capable(info: &AuthSecretTypeInfo) -> bool {\n    !matches!(\n        info.secret_type,\n        ManagedSecretType::RawValue | ManagedSecretType::Dotenvx\n    )\n}\nfor info in all_secret_type_infos().into_iter().filter(|i| ftux_capable(i)) {\n    let v = build_managed_secret_value(&info, &values)?;\n}","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"fn supports_ftux_flow(t: ManagedSecretType) -> bool {\n    !matches!(\n        t,\n        ManagedSecretType::RawValue | ManagedSecretType::Dotenvx\n    )\n}","tryCatchPattern":"match build_managed_secret_value(&info, &values) {\n    Err(e) if e.to_string().contains(\"not supported via the harness FTUX flow\") => {\n        route_to_native_flow(info.secret_type); // dotenvx/raw editor instead\n    }\n    r => r?,\n}","preventionTips":["Populate FTUX pickers from curated static lists (e.g. CODEX_AUTH_SECRET_TYPES), not the full enum","Handle every ManagedSecretType variant explicitly when new types are added","Keep the match arm in build_managed_secret_value and the UI type list in sync"],"tags":["rust","warp","auth","secrets","type-guard","feature-gating"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}