{"record":{"id":"818c3918675edf76","repo":"zed-industries/zed","slug":"verb-password-failed-status","errorCode":null,"errorMessage":"{verb} password failed: {status}","messagePattern":"(.+?) password failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui_macos/src/platform.rs","lineNumber":1210,"sourceCode":"                // update the username and password.\n                let mut verb = \"updating\";\n                let mut query_attrs = CFMutableDictionary::with_capacity(2);\n                query_attrs.set(kSecClass as *const _, kSecClassInternetPassword as *const _);\n                query_attrs.set(kSecAttrServer as *const _, url.as_CFTypeRef());\n\n                let mut attrs = CFMutableDictionary::with_capacity(4);\n                attrs.set(kSecClass as *const _, kSecClassInternetPassword as *const _);\n                attrs.set(kSecAttrServer as *const _, url.as_CFTypeRef());\n                attrs.set(kSecAttrAccount as *const _, username.as_CFTypeRef());\n                attrs.set(kSecValueData as *const _, password.as_CFTypeRef());\n\n                let mut status = SecItemUpdate(\n                    query_attrs.as_concrete_TypeRef(),\n                    attrs.as_concrete_TypeRef(),\n                );\n\n                // If there were no existing credentials for the given server, then create them.\n                if status == errSecItemNotFound {\n                    verb = \"creating\";\n                    status = SecItemAdd(attrs.as_concrete_TypeRef(), ptr::null_mut());\n                }\n                anyhow::ensure!(status == errSecSuccess, \"{verb} password failed: {status}\");\n            }\n            Ok(())\n        })\n    }\n\n    fn read_credentials(&self, url: &str) -> Task<Result<Option<(String, Vec<u8>)>>> {\n        let url = url.to_string();\n        self.background_executor().spawn(async move {\n            let url = CFString::from(url.as_str());\n            let cf_true = CFBoolean::true_value().as_CFTypeRef();\n\n            unsafe {\n                use security::*;\n","sourceCodeStart":1192,"sourceCodeEnd":1228,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/gpui_macos/src/platform.rs#L1192-L1228","documentation":"Guard in the macOS Keychain credential writer: SecItemUpdate (or SecItemAdd) returned a non-zero OSStatus, so storing/updating the internet password failed. {status} is the raw Security framework status code (e.g. -34018 missing entitlement, errSecAuthFailed).","triggerScenarios":"Thrown at crates/gpui_macos/src/platform.rs:1178 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Map the OSStatus: -34018 means keychain-access-groups entitlement missing in dev builds; add it or use a proper signing identity","For errSecItemNotFound, insert first via SecItemAdd instead of SecItemUpdate","Propagate the error to the UI so login-save failures are visible rather than silent"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}