{"record":{"id":"ae386a33c8075a52","repo":"Kuberwastaken/claurst","slug":"upload-failed-with-status","errorCode":null,"errorMessage":"Upload failed with status {}","messagePattern":"Upload failed with status (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-rust/crates/core/src/team_memory_sync.rs","lineNumber":339,"sourceCode":"                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)\n                .await\n                .with_context(|| format!(\"read_dir {:?}\", dir))?;","sourceCodeStart":321,"sourceCodeEnd":357,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/core/src/team_memory_sync.rs#L321-L357","documentation":"Catch-all for the team-memory batch upload: the server answered with a status outside the handled set (2xx/412/413/401/403) — the formatted code is the unclassified status, typically a 5xx or proxy error. The batch was not accepted.","triggerScenarios":"Thrown at src-rust/crates/core/src/team_memory_sync.rs:339 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the push after a short delay; transient errors usually clear","Capture the status and response body if it persists to classify the failure","Local checksums are unchanged, so the next successful push re-uploads the same batch safely"],"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"}