{"record":{"id":"daf2662abdf71a49","repo":"windmill-labs/windmill","slug":"got-value-other-for-field-type-expected-valu","errorCode":null,"errorMessage":"got value: {other} for field `type`, expected value: `static` or `javascript`","messagePattern":"got value: (.+?) for field `type`, expected value: `static` or `javascript`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/windmill-types/src/flows.rs","lineNumber":812,"sourceCode":"impl InputTransform {\n    pub fn new_static_value(value: Box<RawValue>) -> InputTransform {\n        InputTransform::Static { value }\n    }\n\n    pub fn new_javascript_expr(expr: &str) -> InputTransform {\n        InputTransform::Javascript { expr: expr.to_owned() }\n    }\n}\n\nimpl TryFrom<UntaggedInputTransform> for InputTransform {\n    type Error = anyhow::Error;\n    fn try_from(value: UntaggedInputTransform) -> Result<Self, Self::Error> {\n        let input_transform = match value.type_.as_str() {\n            \"static\" => InputTransform::new_static_value(value.value.unwrap_or_else(default_null)),\n            \"javascript\" => InputTransform::new_javascript_expr(&value.expr.unwrap_or_default()),\n            \"ai\" => InputTransform::Ai,\n            other => {\n                return Err(anyhow::anyhow!(\n                    \"got value: {other} for field `type`, expected value: `static` or `javascript`\"\n                ))\n            }\n        };\n\n        Ok(input_transform)\n    }\n}\n\n#[derive(Deserialize)]\n#[serde(untagged)]\nenum RawValueOrFormatted<T> {\n    RawValue(T),\n    Formatted { r#type: String, value: Option<T>, expr: Option<String> },\n}\n\nfn raw_value_to_input_transform<'de, D, T>(\n    deserializer: D,","sourceCodeStart":794,"sourceCodeEnd":830,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/backend/windmill-types/src/flows.rs#L794-L830","documentation":"Raised when converting an UntaggedInputTransform into an InputTransform: the `type` field held a value other than `static`, `javascript`, or `ai`. This TryFrom is strict, so any typo or new/unknown type fails instead of defaulting.","triggerScenarios":"Deserializing input transforms (e.g. from a flow JSON or API payload) where input.type is misspelled or uses a type not handled by this conversion.","commonSituations":"Typo like `Static` or `statc` in hand-edited flow JSON; flows exported from a newer windmill with an added transform type being imported into an older one; programmatic generators emitting wrong type strings.","solutions":["Set the input transform `type` to one of `static`, `javascript`, or `ai`","Fix casing/typos in the JSON (values are lowercase, exact)","If importing from a newer version, upgrade windmill or strip unknown transform types","If a `static`/`javascript` transform, also ensure `value`/`expr` fields are present"],"exampleFix":"// before\n{\"type\": \"static_value\", \"value\": 42}\n// after\n{\"type\": \"static\", \"value\": 42}","handlingStrategy":"validation","validationCode":"const ALLOWED = new Set([\"static\", \"javascript\", \"ai\"]);\nfunction validateTransform(t) {\n  if (!ALLOWED.has(t.type)) throw new Error(`bad transform type: ${t.type}`);\n}\ntransforms.forEach(validateTransform);","typeGuard":"function isInputTransformType(v: string): v is \"static\" | \"javascript\" | \"ai\" {\n  return v === \"static\" || v === \"javascript\" || v === \"ai\";\n}","tryCatchPattern":"try {\n  deployFlow(flow);\n} catch (e) {\n  if (String(e).includes(\"expected value: `static` or `javascript`\")) {\n    console.error(\"Fix input transform `type` field:\", e.message);\n  } else throw e;\n}","preventionTips":["Only emit lowercase `static`/`javascript`/`ai` as transform type","Lint flow JSON against the transform-type enum before import","Upgrade windmill before importing flows from newer versions"],"tags":["rust","flows","validation","deserialize"],"backgroundTag":"schema-validation-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"}