{"record":{"id":"4417ce4955358043","repo":"tinyhumansai/openhuman","slug":"invalid-handle-kind-must-be-imessage-email-displa","errorCode":null,"errorMessage":"invalid handle (kind must be imessage|email|display_name): {e}","messagePattern":"invalid handle \\(kind must be imessage\\|email\\|display_name\\): (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/tools/people.rs","lineNumber":63,"sourceCode":"        .map(str::to_string)\n        .ok_or_else(|| anyhow::anyhow!(\"missing required string argument `{key}`\"))\n}\n\n/// Read `person_id` as the opaque token the contract defines it to be.\n///\n/// It is not parsed into a `Uuid` here: `PersonRef` is opaque by contract and\n/// the driver owns its format. Validating a shape the host does not define\n/// would reject a driver that identifies people some other way.\nfn parse_person_id(args: &serde_json::Value) -> anyhow::Result<String> {\n    read_required_str(args, \"person_id\")\n}\n\n/// Build a [`PersonHandle`] from `kind` + `value` args.\nfn parse_handle(args: &serde_json::Value) -> anyhow::Result<PersonHandle> {\n    let kind = read_required_str(args, \"kind\")?;\n    let value = read_required_str(args, \"value\")?;\n    serde_json::from_value(json!({ \"kind\": kind, \"value\": value })).map_err(|e| {\n        anyhow::anyhow!(\"invalid handle (kind must be imessage|email|display_name): {e}\")\n    })\n}\n\nfn handle_schema_props() -> serde_json::Value {\n    json!({\n        \"kind\": { \"type\": \"string\", \"enum\": [\"imessage\", \"email\", \"display_name\"], \"description\": \"Handle kind.\" },\n        \"value\": { \"type\": \"string\", \"description\": \"Handle value (phone / email / display name).\" }\n    })\n}\n\n/// List ranked contacts.\npub struct PeopleListTool;\n\n#[async_trait]\nimpl Tool for PeopleListTool {\n    fn name(&self) -> &str {\n        \"people_list\"\n    }","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/tools/people.rs#L45-L81","documentation":"Handle validation in parse_handle (used by people_add_alias and related tools): the `kind` argument was not one of imessage|email|display_name (parse failure surfaced from PersonHandle construction). person_id is deliberately left opaque per contract — only kind/value shape is validated host-side. The message embeds the underlying parse error `{e}`.","triggerScenarios":"Thrown at src/openhuman/memory/tools/people.rs:63 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a valid kind: imessage, email, or display_name","Check the value format matches the kind (e.g. an email address for email)","Fix malformed handle values from the model's tool call"],"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"}