{"record":{"id":"e16322d0cc4055d7","repo":"ramensoftware/windhawk","slug":"pos-failed-id-reason","errorCode":null,"errorMessage":"{pos} Failed {id}: {reason}","messagePattern":"(.+?) Failed (.+?): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/windhawk-core/cli/src/commands/data.rs","lineNumber":240,"sourceCode":"    };\n    // A driven install's compile progress, stamped with the mod id.\n    if let Some(triple) = payload.get(\"compileTarget\").and_then(Value::as_str) {\n        let id = payload.get(\"modId\").and_then(Value::as_str).unwrap_or(\"\");\n        logger.info(&format!(\"Compiling {id} for {}...\", arch_label(triple)));\n        return;\n    }\n    let Ok(progress) = serde_json::from_value::<ImportProgress>(payload.clone()) else {\n        return;\n    };\n    let pos = format!(\"[{}/{}]\", progress.index + 1, progress.total);\n    let id = &progress.mod_id;\n    match progress.status {\n        ImportProgressStatus::Installing => logger.info(&format!(\"{pos} Importing {id}...\")),\n        ImportProgressStatus::Installed => logger.info(&format!(\"{pos} Installed {id}\")),\n        ImportProgressStatus::Skipped => logger.info(&format!(\"{pos} Skipped {id}\")),\n        ImportProgressStatus::Failed => {\n            let reason = progress.message.as_deref().unwrap_or(\"import failed\");\n            logger.warn(&format!(\"{pos} Failed {id}: {reason}\"));\n        }\n    }\n}\n\n/// The selection flag values shared by `data export` and `data import` (their\n/// clap arg structs carry an identical set), borrowed into one view so the\n/// mapping onto the shared selection shape lives in one place.\nstruct SelectionFlags<'a> {\n    app_settings: bool,\n    no_app_settings: bool,\n    mods: &'a str,\n    settings: bool,\n    no_settings: bool,\n    config: bool,\n    no_config: bool,\n    skip_settings: Option<&'a str>,\n    with_settings: Option<&'a str>,\n    skip_config: Option<&'a str>,","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/ramensoftware/windhawk/blob/61d99ed8e182e1af1b60109612b6763ad1b4b74e/src/windhawk-core/cli/src/commands/data.rs#L222-L258","documentation":"A per-mod failure line logged during `data import` progress: '<pos> Failed <mod_id>: <reason>'. When the core reports ImportProgressStatus::Failed for a mod, the CLI logs the reason (or a generic 'import failed') as a warning and continues with the remaining mods.","triggerScenarios":"Importing an archive where a specific mod fails to install — e.g. its source no longer compiles, its version is unavailable, or its settings cannot be applied — while the overall import proceeds.","commonSituations":"Restoring an old backup onto a newer Windhawk where a mod version is gone; mods with local source that was never archived; compilation failures during mod installation.","solutions":["Read the <reason> after the mod id to learn the specific failure","Retry the import for the failed mod alone after fixing its cause","Check the final exit summary — partial imports still report overall status","Manually install the failing mod from its repository/local source"],"exampleFix":"// before\nwindhawk data import backup.whc --yes   # exits 0, mod X failed silently in logs\n// after\nwindhawk data import backup.whc --yes || true\ngrep 'Failed ' import.log   # find failed mod ids and re-import them individually","handlingStrategy":"try-catch","validationCode":"// pre-check: ensure the archive's mod versions still exist in the repository before importing","typeGuard":null,"tryCatchPattern":"match import(env, args) {\n    Ok(summary) => for line in &summary.failures { eprintln!(\"retry mod: {line}\") },\n    Err(e) => return Err(e),\n}","preventionTips":["Inspect per-mod Failed lines after every import","Re-import failed mods individually after fixing the cause","Keep mod sources available when importing archives containing local mods"],"tags":["cli","import","progress"],"backgroundTag":"api-error-response","analyzedSha":"61d99ed8e182e1af1b60109612b6763ad1b4b74e","analyzedAt":"2026-09-12T14:02:41.115Z","contentChangedAt":"2026-09-12T14:02:41.115Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}