{"record":{"id":"6332b9eef694ce1c","repo":"spacedriveapp/spacedrive","slug":"invalid-sync-mode","errorCode":null,"errorMessage":"Invalid sync mode","messagePattern":"Invalid sync mode","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/src/service/file_sync/mod.rs","lineNumber":93,"sourceCode":"\tpub async fn sync_now(&self, conduit_id: i32) -> Result<SyncHandle> {\n\t\t// Load conduit\n\t\tlet conduit = self.conduit_manager.get_conduit(conduit_id).await?;\n\n\t\tif !conduit.enabled {\n\t\t\treturn Err(anyhow::anyhow!(\"Conduit is disabled\"));\n\t\t}\n\n\t\t// Check if already syncing\n\t\tif self.active_syncs.read().await.contains_key(&conduit_id) {\n\t\t\treturn Err(anyhow::anyhow!(\"Sync already in progress for this conduit\"));\n\t\t}\n\n\t\t// Calculate sync operations\n\t\tinfo!(\"Calculating sync operations for conduit {}\", conduit_id);\n\t\tlet operations = self.resolver.calculate_operations(&conduit).await?;\n\n\t\tlet mode = sync_conduit::SyncMode::from_str(&conduit.sync_mode)\n\t\t\t.ok_or_else(|| anyhow::anyhow!(\"Invalid sync mode\"))?;\n\n\t\tlet copy_count = operations.source_to_target.to_copy.len()\n\t\t\t+ operations\n\t\t\t\t.target_to_source\n\t\t\t\t.as_ref()\n\t\t\t\t.map(|ops| ops.to_copy.len())\n\t\t\t\t.unwrap_or(0);\n\t\tlet delete_count = operations.source_to_target.to_delete.len()\n\t\t\t+ operations\n\t\t\t\t.target_to_source\n\t\t\t\t.as_ref()\n\t\t\t\t.map(|ops| ops.to_delete.len())\n\t\t\t\t.unwrap_or(0);\n\n\t\tinfo!(\n\t\t\t\"Sync plan for {:?} mode: {} to copy, {} to delete\",\n\t\t\tmode, copy_count, delete_count\n\t\t);","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/spacedriveapp/spacedrive/blob/6dfeccf2113039e35f2ce735f945e70dc3e4ea45/core/src/service/file_sync/mod.rs#L75-L111","documentation":"Error \"Invalid sync mode\" thrown in spacedriveapp/spacedrive.","triggerScenarios":"Thrown at core/src/service/file_sync/mod.rs:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6dfeccf2113039e35f2ce735f945e70dc3e4ea45","analyzedAt":"2026-08-16T11:26:17.074Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}