{"record":{"id":"27c1d0b6870b30fb","repo":"zeroclaw-labs/zeroclaw","slug":"to-must-contain-at-least-one-email-address","errorCode":null,"errorMessage":"to must contain at least one email address","messagePattern":"to must contain at least one email address","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/microsoft365/mod.rs","lineNumber":369,"sourceCode":"\n        let token = self.get_token().await?;\n        let to: Vec<String> = args[\"to\"]\n            .as_array()\n            .ok_or_else(|| {\n                ::zeroclaw_log::record!(\n                    WARN,\n                    ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Reject)\n                        .with_outcome(::zeroclaw_log::EventOutcome::Failure),\n                    \"mod: to must be an array of email addresses\"\n                );\n                anyhow::Error::msg(\"to must be an array of email addresses\")\n            })?\n            .iter()\n            .filter_map(|v| v.as_str().map(String::from))\n            .collect();\n\n        if to.is_empty() {\n            anyhow::bail!(\"to must contain at least one email address\");\n        }\n\n        let subject = args[\"subject\"].as_str().ok_or_else(|| {\n            ::zeroclaw_log::record!(\n                WARN,\n                ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Reject)\n                    .with_outcome(::zeroclaw_log::EventOutcome::Failure),\n                \"mod: subject is required\"\n            );\n            anyhow::Error::msg(\"subject is required\")\n        })?;\n        let body = args[\"body\"].as_str().ok_or_else(|| {\n            ::zeroclaw_log::record!(\n                WARN,\n                ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Reject)\n                    .with_outcome(::zeroclaw_log::EventOutcome::Failure),\n                \"mod: body is required\"\n            );","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/microsoft365/mod.rs#L351-L387","documentation":"Error \"to must contain at least one email address\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-tools/src/microsoft365/mod.rs:369 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add at least one recipient address to the 'to' field."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}