{"record":{"id":"4f4d9572d54462a5","repo":"windmill-labs/windmill","slug":"unsupported-trigger-kind-target-triggerkind","errorCode":null,"errorMessage":"Unsupported trigger kind: ${target.triggerKind}","messagePattern":"Unsupported trigger kind: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"windmill-yaml-validator/src/validation/yaml-validator.ts","lineNumber":127,"sourceCode":"    doc: string,\n    target: ValidationTarget\n  ): { parsed: YamlParserResult<unknown>; errors: ErrorObject[] } {\n    if (typeof doc !== \"string\") {\n      throw new Error(\"Document must be a string\");\n    }\n\n    const parsed = parseWithPointers(doc);\n    const { data } = parsed;\n\n    let validator: ValidateFunction;\n    if (target.type === \"flow\") {\n      validator = this.validateFlow;\n    } else if (target.type === \"schedule\") {\n      validator = this.validateSchedule;\n    } else {\n      validator = this.validateTrigger[target.triggerKind];\n      if (!validator) {\n        throw new Error(`Unsupported trigger kind: ${target.triggerKind}`);\n      }\n    }\n\n    const ok = validator(data);\n    if (ok) {\n      return { parsed, errors: [] };\n    }\n\n    return {\n      parsed,\n      errors: validator.errors || [],\n    };\n  }\n}\n","sourceCodeStart":109,"sourceCodeEnd":142,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/windmill-yaml-validator/src/validation/yaml-validator.ts#L109-L142","documentation":"yaml-validator's validate() dispatches to a per-kind trigger validator via this.validateTrigger[target.triggerKind] (yaml-validator.ts:127). When target.type is 'trigger' but its triggerKind has no registered validator, it throws \"Unsupported trigger kind: <kind>\", typically meaning a typo or a trigger kind added before the validator supported it.","triggerScenarios":"Calling validate(doc, { type: 'trigger', triggerKind: X }) where X is misspelled, undefined, or a kind this validator version does not recognize.","commonSituations":"Typo in triggerKind ('schdule'); older validator package validating a YAML from a newer Windmill with a new trigger kind; triggerKind missing from the target object so it reads 'undefined'.","solutions":["Check triggerKind spelling against supported kinds","Upgrade windmill-yaml-validator to a version that supports the kind","Log target.triggerKind — 'undefined' means the field is missing"],"exampleFix":"// before\nvalidate(doc, { type: 'trigger', triggerKind: 'schdeule' })\n// after\nvalidate(doc, { type: 'trigger', triggerKind: 'schedule' })","handlingStrategy":"validation","validationCode":"const SUPPORTED = ['http','websocket','postgres','kafka','nats','mqtt','s3','schedule','email'];\nif (target.type === 'trigger' && !SUPPORTED.includes(target.triggerKind)) {\n  throw new Error(`Trigger kind not supported by this validator: ${target.triggerKind}`);\n}","typeGuard":"function hasKnownTriggerKind(t: { triggerKind?: string }): boolean { return typeof t.triggerKind === 'string' && t.triggerKind in validator.validateTrigger; }","tryCatchPattern":"try {\n  result = validator.validate(doc, target);\n} catch (e) {\n  if (e.message.startsWith('Unsupported trigger kind')) {\n    console.error('Unknown/unsupported triggerKind — check spelling or upgrade validator:', target.triggerKind);\n  }\n  throw e;\n}","preventionTips":["Keep triggerKind values in a shared typed enum with the validator","Upgrade the validator package in lockstep with Windmill server versions","Log the target object to catch undefined triggerKind early"],"tags":["yaml","validation","unsupported"],"backgroundTag":"unsupported-enum-value","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"}