{"record":{"id":"ab013bf73f19c811","repo":"Hmbown/CodeWhale","slug":"external-credential-consent-for-uses-unsupporte","errorCode":null,"errorMessage":"external credential consent for {} uses unsupported version {}; revoke and consent again","messagePattern":"external credential consent for (.+?) uses unsupported version (.+?); revoke and consent again","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/config/src/external_credentials.rs","lineNumber":375,"sourceCode":"        &self,\n        provider: ProviderKind,\n        source: ExternalCredentialSource,\n        resolved_path: &Path,\n    ) -> Result<()> {\n        if self.access == ExternalCredentialAccess::Disabled {\n            bail!(\n                \"external credential access is disabled for {}\",\n                provider.as_str()\n            );\n        }\n        if self.access == ExternalCredentialAccess::Managed {\n            bail!(\n                \"managed external credential access is unsupported for {}; no schema-safe preservation adapter is available\",\n                provider.as_str()\n            );\n        }\n        if self.consent_version != EXTERNAL_CREDENTIAL_CONSENT_VERSION {\n            bail!(\n                \"external credential consent for {} uses unsupported version {}; revoke and consent again\",\n                provider.as_str(),\n                self.consent_version\n            );\n        }\n        if self.provider != provider.as_str() {\n            bail!(\n                \"external credential consent is scoped to provider {:?}, not {}\",\n                self.provider,\n                provider.as_str()\n            );\n        }\n        if self.source != source {\n            bail!(\n                \"external credential consent source mismatch for {} (expected {})\",\n                provider.as_str(),\n                source.as_str()\n            );","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/config/src/external_credentials.rs#L357-L393","documentation":"Thrown by validate_read_scope when the stored consent_version for a provider does not match EXTERNAL_CREDENTIAL_CONSENT_VERSION: the user consented to external credential access under an older (or newer) consent schema that this build will not honor. The message instructs revoking and re-consenting so the grant is re-established under the current terms.","triggerScenarios":"read_grant after the application updated EXTERNAL_CREDENTIAL_CONSENT_VERSION but the persisted policy still carries the old version; restoring a config backup from an older release; downgrading the binary against a newer consent record.","commonSituations":"Upgrading the app where the consent schema changed; syncing config files across machines running different versions.","solutions":["Revoke external credential access for the provider and re-run the consent flow to record the current version","Upgrade or align the application version with the one that wrote the consent record","Edit the stored consent_version to the current EXTERNAL_CREDENTIAL_CONSENT_VERSION only via the official consent flow (never by hand-editing)","Reset the external-credentials section of config.toml and set it up again"],"exampleFix":"// before (config.toml)\n[external_credentials.openai]\nconsent_version = 1\n// after: re-run consent; tooling writes\n[external_credentials.openai]\nconsent_version = 2","handlingStrategy":"try-catch","validationCode":"// Compare stored consent version before reading\nlet policy = load_external_credentials_policy(provider)?;\nif policy.consent_version != EXTERNAL_CREDENTIAL_CONSENT_VERSION {\n    // trigger revoke + re-consent flow instead of read_grant\n}","typeGuard":null,"tryCatchPattern":"match read_grant(provider, source, &path) {\n    Err(e) if e.to_string().contains(\"unsupported version\") => {\n        revoke_consent(provider)?;\n        run_consent_flow(provider)?;\n        read_grant(provider, source, &path)?\n    }\n    other => other?,\n}","preventionTips":["Re-run the consent flow after upgrading the application","Do not restore old config backups across version changes without re-consenting","Keep application versions consistent across machines sharing a config"],"tags":["config","credentials","consent","versioning"],"backgroundTag":"invalid-config-value","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}