{"record":{"id":"18025f0fc11379ff","repo":"tinyhumansai/openhuman","slug":"unsupported-auth-profile-kind-other","errorCode":null,"errorMessage":"Unsupported auth profile kind: {other}","messagePattern":"Unsupported auth profile kind: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/security/credentials/profiles.rs","lineNumber":1747,"sourceCode":"/// non-zero, returning a `__TEST_TRANSIENT__` error so `is_transient_fs_error`\n/// classifies the failure as retryable. Used by both per-stage consumers in\n/// `write_persisted_locked` (test-only).\n#[cfg(test)]\nfn consume_one(counter: &AtomicUsize) -> Result<()> {\n    if counter.load(Ordering::SeqCst) == 0 {\n        return Ok(());\n    }\n    counter.fetch_sub(1, Ordering::SeqCst);\n    Err(anyhow::anyhow!(\n        \"__TEST_TRANSIENT__ injected transient FS failure\"\n    ))\n}\n\nfn parse_profile_kind(value: &str) -> Result<AuthProfileKind> {\n    match value {\n        \"oauth\" => Ok(AuthProfileKind::OAuth),\n        \"token\" => Ok(AuthProfileKind::Token),\n        other => anyhow::bail!(\"Unsupported auth profile kind: {other}\"),\n    }\n}\n\nfn profile_kind_to_string(kind: AuthProfileKind) -> &'static str {\n    match kind {\n        AuthProfileKind::OAuth => \"oauth\",\n        AuthProfileKind::Token => \"token\",\n    }\n}\n\nfn parse_optional_datetime(value: Option<&str>) -> Result<Option<DateTime<Utc>>> {\n    value.map(parse_datetime).transpose()\n}\n\nfn parse_datetime(value: &str) -> Result<DateTime<Utc>> {\n    DateTime::parse_from_rfc3339(value)\n        .map(|dt| dt.with_timezone(&Utc))\n        .with_context(|| format!(\"Invalid RFC3339 timestamp: {value}\"))","sourceCodeStart":1729,"sourceCodeEnd":1765,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/security/credentials/profiles.rs#L1729-L1765","documentation":"parse_profile_kind rejects a `kind` string from a stored or submitted profile that is not one of the known variants (e.g. \"oauth\", \"token\"). This is a deserialization guard: an unknown kind means either a corrupted store file or a profile written by a newer build with a kind this version does not know.","triggerScenarios":"Thrown at src/openhuman/security/credentials/profiles.rs:1747 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the kind value in the profiles file to a supported variant.","Upgrade OpenHuman if the profile was written by a newer version with a new kind.","Re-create the affected profile if the store data is corrupted."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}