{"record":{"id":"c92ed49650ddb8a4","repo":"zeroclaw-labs/zeroclaw","slug":"slack-outbound-attachment-exceeds-bytes","errorCode":null,"errorMessage":"Slack outbound attachment exceeds {} bytes: {}","messagePattern":"Slack outbound attachment exceeds (.+?) bytes: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/slack.rs","lineNumber":1075,"sourceCode":"            );\n        }\n\n        let metadata = tokio::fs::metadata(&canonical_path)\n            .await\n            .with_context(|| {\n                format!(\n                    \"failed to stat Slack outbound attachment {}\",\n                    canonical_path.display()\n                )\n            })?;\n        if !metadata.is_file() {\n            anyhow::bail!(\n                \"Slack outbound attachment target is not a file: {}\",\n                canonical_path.display()\n            );\n        }\n        if metadata.len() > SLACK_OUTBOUND_ATTACHMENT_MAX_BYTES as u64 {\n            anyhow::bail!(\n                \"Slack outbound attachment exceeds {} bytes: {}\",\n                SLACK_OUTBOUND_ATTACHMENT_MAX_BYTES,\n                canonical_path.display()\n            );\n        }\n\n        let data = tokio::fs::read(&canonical_path).await.with_context(|| {\n            format!(\n                \"failed to read Slack outbound attachment {}\",\n                canonical_path.display()\n            )\n        })?;\n        let file_name = canonical_path\n            .file_name()\n            .and_then(|name| name.to_str())\n            .and_then(Self::sanitize_attachment_filename)\n            .unwrap_or_else(|| \"attachment.bin\".to_string());\n        let mime_type = match marker.kind {","sourceCodeStart":1057,"sourceCodeEnd":1093,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/slack.rs#L1057-L1093","documentation":"Error \"Slack outbound attachment exceeds {} bytes: {}\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-channels/src/slack.rs:1075 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Split the attachment into smaller files below the Slack size limit, or share it via a workspace link instead of uploading."],"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"}