{"record":{"id":"0f417be59d2b331c","repo":"Kuberwastaken/claurst","slug":"payload-too-large-413","errorCode":null,"errorMessage":"Payload too large (413)","messagePattern":"Payload too large \\(413\\)","errorType":"http","errorClass":null,"httpStatus":413,"severity":"error","filePath":"src-rust/crates/core/src/team_memory_sync.rs","lineNumber":337,"sourceCode":"        match status {\n            200 | 201 | 204 => {\n                if let Some(etag) = response\n                    .headers()\n                    .get(\"etag\")\n                    .and_then(|v| v.to_str().ok())\n                {\n                    state.last_known_etag = Some(etag.to_string());\n                }\n                // Update local checksum map to reflect uploaded state\n                for entry in &batch {\n                    state\n                        .server_checksums\n                        .insert(entry.key.clone(), entry.checksum.clone());\n                }\n                Ok(())\n            }\n            412 => anyhow::bail!(\"Conflict (412 Precondition Failed): ETag mismatch, retry needed\"),\n            413 => anyhow::bail!(\"Payload too large (413)\"),\n            401 | 403 => anyhow::bail!(\"Authentication error ({})\", status),\n            _ => anyhow::bail!(\"Upload failed with status {}\", status),\n        }\n    }\n\n    /// Recursively scan `team_dir` for `.md` files, returning entries sorted by key.\n    async fn scan_local_files(&self) -> Result<Vec<TeamMemoryEntry>> {\n        let mut entries = Vec::new();\n\n        if !self.team_dir.exists() {\n            return Ok(entries);\n        }\n\n        // Iterative DFS using an explicit stack to avoid deep recursion\n        let mut stack = vec![self.team_dir.clone()];\n\n        while let Some(dir) = stack.pop() {\n            let mut read_dir = tokio::fs::read_dir(&dir)","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/core/src/team_memory_sync.rs#L319-L355","documentation":"The team-memory batch PUT exceeded the server's request-size limit: HTTP 413 Payload Too Large. The batch of entries sent in one request is bigger than the endpoint accepts, so nothing in the batch was stored.","triggerScenarios":"Thrown at src-rust/crates/core/src/team_memory_sync.rs:337 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Split the batch into smaller chunks and upload sequentially","Reduce individual entry sizes (large memories should be summarized or split)","After splitting, re-pull first if an ETag conflict arises"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b0637c97ec34144387cbf2f74f65df6d16a6cef1","analyzedAt":"2026-09-10T00:24:58.650Z","contentChangedAt":"2026-09-10T00:24:58.650Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}