zeroclaw-labs/zeroclaw · error · anyhow::Error

Slack outbound attachment exceeds {} bytes: {}

Error message

Slack outbound attachment exceeds {} bytes: {}

What it means

Error "Slack outbound attachment exceeds {} bytes: {}" thrown in zeroclaw-labs/zeroclaw.

Source

Thrown at crates/zeroclaw-channels/src/slack.rs:1075

            );
        }

        let metadata = tokio::fs::metadata(&canonical_path)
            .await
            .with_context(|| {
                format!(
                    "failed to stat Slack outbound attachment {}",
                    canonical_path.display()
                )
            })?;
        if !metadata.is_file() {
            anyhow::bail!(
                "Slack outbound attachment target is not a file: {}",
                canonical_path.display()
            );
        }
        if metadata.len() > SLACK_OUTBOUND_ATTACHMENT_MAX_BYTES as u64 {
            anyhow::bail!(
                "Slack outbound attachment exceeds {} bytes: {}",
                SLACK_OUTBOUND_ATTACHMENT_MAX_BYTES,
                canonical_path.display()
            );
        }

        let data = tokio::fs::read(&canonical_path).await.with_context(|| {
            format!(
                "failed to read Slack outbound attachment {}",
                canonical_path.display()
            )
        })?;
        let file_name = canonical_path
            .file_name()
            .and_then(|name| name.to_str())
            .and_then(Self::sanitize_attachment_filename)
            .unwrap_or_else(|| "attachment.bin".to_string());
        let mime_type = match marker.kind {

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Split the attachment into smaller files below the Slack size limit, or share it via a workspace link instead of uploading.

When it happens

Trigger: Thrown at crates/zeroclaw-channels/src/slack.rs:1075 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/c92ed49650ddb8a4. Report an issue: GitHub.