{"record":{"id":"64e5929f4c43c8aa","repo":"spacedriveapp/spacedrive","slug":"invalid-sidecar-status","errorCode":null,"errorMessage":"Invalid sidecar status: {}","messagePattern":"Invalid sidecar status: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"warning","filePath":"core/src/service/sidecar_manager.rs","lineNumber":176,"sourceCode":"\t\t\t\t\t&SidecarVariant::new(&sidecar.variant),\n\t\t\t\t\t&sidecar\n\t\t\t\t\t\t.format\n\t\t\t\t\t\t.as_str()\n\t\t\t\t\t\t.try_into()\n\t\t\t\t\t\t.map_err(|e: String| anyhow::anyhow!(e))?,\n\t\t\t\t)\n\t\t\t\t.await?;\n\n\t\t\tentry.insert(\n\t\t\t\tsidecar.variant.clone(),\n\t\t\t\tSidecarPresence {\n\t\t\t\t\tlocal: true,\n\t\t\t\t\tpath: Some(path.relative_path),\n\t\t\t\t\tstatus: sidecar\n\t\t\t\t\t\t.status\n\t\t\t\t\t\t.as_str()\n\t\t\t\t\t\t.try_into()\n\t\t\t\t\t\t.map_err(|e: String| anyhow::anyhow!(e))?,\n\t\t\t\t\tdevices: vec![],\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\t// Query availability on other devices\n\t\tlet availability = SidecarAvailability::find()\n\t\t\t.filter(sidecar_availability::Column::ContentUuid.is_in(content_uuids.to_vec()))\n\t\t\t.filter(sidecar_availability::Column::Kind.eq(kind.as_str()))\n\t\t\t.filter(\n\t\t\t\tsidecar_availability::Column::Variant.is_in(variants.iter().map(|v| v.as_str())),\n\t\t\t)\n\t\t\t.filter(sidecar_availability::Column::Has.eq(true))\n\t\t\t.all(db.conn())\n\t\t\t.await?;\n\n\t\t// Add remote device availability\n\t\tfor avail in availability {","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/spacedriveapp/spacedrive/blob/6dfeccf2113039e35f2ce735f945e70dc3e4ea45/core/src/service/sidecar_manager.rs#L158-L194","documentation":"Converting the sidecar row's status string into its typed enum via TryInto failed; the passthrough error names the invalid status. The stored status is not a value this build recognizes, which aborts the availability listing for that content.","triggerScenarios":"A status written by a different version (statuses added or renamed); imported or hand-edited sidecar rows; partial writes leaving malformed status text.","commonSituations":"Version upgrades changing the status set; sync conflicts writing statuses the local build cannot parse.","solutions":["Inspect and normalize status values in the sidecar table for the affected rows","Skip rows with unknown statuses and log a warning rather than failing the listing","Migrate status values on upgrade whenever the enum changes"],"exampleFix":"// before\nlet status = sidecar.status.as_str().try_into().map_err(|e: String| anyhow::anyhow!(e))?;\n\n// after\nlet Ok(status) = SidecarStatus::try_from(sidecar.status.as_str()) else {\n    warn!(status = %sidecar.status, \"unknown sidecar status, skipping row\");\n    continue;\n};","handlingStrategy":"fallback","validationCode":"let known: Vec<&SidecarRow> = rows.iter().filter(|r| SidecarStatus::try_from(r.status.as_str()).is_ok()).collect();","typeGuard":"fn is_known_sidecar_status(value: &str) -> bool {\n    SidecarStatus::try_from(value).is_ok()\n}","tryCatchPattern":"match SidecarStatus::try_from(sidecar.status.as_str()) {\n    Ok(status) => { /* use it */ }\n    Err(_) => {\n        warn!(status = %sidecar.status, \"unknown sidecar status, skipping row\");\n        continue;\n    }\n}","preventionTips":["Migrate status values whenever the enum changes between versions","Skip-and-warn on unparseable statuses rather than failing the listing","Validate status strings at the write boundary so only known values land in the table"],"tags":["sidecar","data-validation","version-skew","database"],"backgroundTag":null,"analyzedSha":"6dfeccf2113039e35f2ce735f945e70dc3e4ea45","analyzedAt":"2026-08-16T11:26:17.074Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}