{"record":{"id":"2b2bed5f6f981e90","repo":"sigoden/dufs","slug":"err","errorCode":null,"errorMessage":"{err}","messagePattern":"\\{err\\}","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/server.rs","lineNumber":695,"sourceCode":"                &mut writer,\n                &path,\n                access_paths,\n                &hidden,\n                compression,\n                follow_symlinks,\n                serve_path,\n                running,\n            )\n            .await\n            {\n                error!(\"Failed to zip {}, {e}\", path.display());\n            }\n        });\n        let reader_stream = ReaderStream::with_capacity(reader, BUF_SIZE);\n        let stream_body = StreamBody::new(\n            reader_stream\n                .map_ok(Frame::data)\n                .map_err(|err| anyhow!(\"{err}\")),\n        );\n        let boxed_body = stream_body.boxed();\n        *res.body_mut() = boxed_body;\n        Ok(())\n    }\n\n    async fn handle_render_index(\n        &self,\n        path: &Path,\n        query_params: &HashMap<String, String>,\n        headers: &HeaderMap<HeaderValue>,\n        head_only: bool,\n        user: Option<String>,\n        access_paths: AccessPaths,\n        res: &mut Response,\n    ) -> Result<()> {\n        let index_path = path.join(INDEX_NAME);\n        if fs::metadata(&index_path)","sourceCodeStart":677,"sourceCodeEnd":713,"githubUrl":"https://github.com/sigoden/dufs/blob/fe7fd564f80dfbac361c8e0589c3845638149d38/src/server.rs#L677-L713","documentation":"In handle_zip_dir the zip archive is produced on a spawned task and streamed to the client via ReaderStream. This map_err wraps any I/O error emitted while reading from the zip writer pipe (e.g. the spawned zip task failed or the reader broke) into an anyhow error so the response body stream can carry it; the underlying cause was already logged as `Failed to zip {path}`.","triggerScenarios":"Thrown at src/server.rs:695 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check server logs for the accompanying `Failed to zip <path>` message to find the root cause","Retry the download; if it recurs, verify the directory and its contents are readable and not being modified concurrently","Avoid zipping extremely large directories that may exceed timeouts"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fe7fd564f80dfbac361c8e0589c3845638149d38","analyzedAt":"2026-09-09T13:01:22.843Z","contentChangedAt":"2026-09-09T13:01:22.843Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}