{"record":{"id":"d6f055b2269fbded","repo":"windmill-labs/windmill","slug":"module","errorCode":null,"errorMessage":"Module '{}': {}","messagePattern":"Module '(.+?)': (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/windmill-types/src/flows.rs","lineNumber":710,"sourceCode":"        #[derive(Deserialize)]\n        pub struct FlowModuleValueType<'a> {\n            pub r#type: &'a str,\n        }\n\n        serde_json::from_str::<FlowModuleValueType>(self.value.get())\n            .map_err(|e| anyhow::anyhow!(\"{}\", e))\n            .map(|x| x.r#type)\n    }\n\n    pub fn traverse_modules<C: FnMut(&FlowModule) -> anyhow::Result<()>>(\n        modules: &Vec<FlowModule>,\n        cb: &mut C,\n    ) -> anyhow::Result<()> {\n        for module in modules {\n            cb(module)?;\n            let module_value = module\n                .get_value()\n                .map_err(|e| anyhow::anyhow!(\"Module '{}': {}\", module.id, e))?;\n            Self::traverse_module_value(&module_value, cb)?;\n        }\n        Ok(())\n    }\n\n    fn traverse_module_value<C: FnMut(&FlowModule) -> anyhow::Result<()>>(\n        module_value: &FlowModuleValue,\n        cb: &mut C,\n    ) -> anyhow::Result<()> {\n        match module_value {\n            FlowModuleValue::ForloopFlow { modules, .. }\n            | FlowModuleValue::WhileloopFlow { modules, .. } => {\n                Self::traverse_modules(modules, cb)?;\n            }\n            FlowModuleValue::BranchOne { branches, default, .. } => {\n                for branch in branches {\n                    Self::traverse_modules(&branch.modules, cb)?;\n                }","sourceCodeStart":692,"sourceCodeEnd":728,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/windmill-types/src/flows.rs#L692-L728","documentation":"Wraps any error produced while obtaining a flow module's value (its inner job/payload) during flow traversal, prefixing it with the module id so callers can tell which module of the flow failed. It is a context-preserving wrapper, not a distinct failure mode: the root cause is whatever get_value() returned.","triggerScenarios":"Calling Flow::traverse / traverse_module_value on a flow whose module get_value() fails — e.g. a module value cannot be deserialized or resolved.","commonSituations":"Flows edited by hand or by scripts containing corrupt module values; flows imported from other instances with incompatible payload shapes; schema changes to FlowModuleValue after a version upgrade.","solutions":["Read the inner error after 'Module <id>': it names the real cause","Inspect the module with that id in the flow editor and fix its value/expr","Re-deploy the flow from a known-good definition","Check for windmill version mismatches between exporter and importer"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Rust\nmatch flow.traverse(&mut cb) {\n    Err(e) if e.to_string().starts_with(\"Module '\") => {\n        let module_id = e.to_string().split('\\'').nth(1).unwrap_or(\"?\");\n        eprintln!(\"fix flow module {module_id}: {e:#}\");\n    }\n    Err(e) => return Err(e),\n    Ok(()) => {}\n}","preventionTips":["Validate flow definitions (schema check) before deploy","Round-trip export/import in CI to catch corrupt module values","Keep windmill versions aligned across environments"],"tags":["rust","flows","error-context"],"backgroundTag":"flow-module-resolution-failed","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}