windmill-labs/windmill · error · Error

Unsupported trigger kind: ${target.triggerKind}

Error message

Unsupported trigger kind: ${target.triggerKind}

What it means

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.

Source

Thrown at windmill-yaml-validator/src/validation/yaml-validator.ts:127

    doc: string,
    target: ValidationTarget
  ): { parsed: YamlParserResult<unknown>; errors: ErrorObject[] } {
    if (typeof doc !== "string") {
      throw new Error("Document must be a string");
    }

    const parsed = parseWithPointers(doc);
    const { data } = parsed;

    let validator: ValidateFunction;
    if (target.type === "flow") {
      validator = this.validateFlow;
    } else if (target.type === "schedule") {
      validator = this.validateSchedule;
    } else {
      validator = this.validateTrigger[target.triggerKind];
      if (!validator) {
        throw new Error(`Unsupported trigger kind: ${target.triggerKind}`);
      }
    }

    const ok = validator(data);
    if (ok) {
      return { parsed, errors: [] };
    }

    return {
      parsed,
      errors: validator.errors || [],
    };
  }
}

View on GitHub (pinned to e474e8803c)

Solutions

  1. Check triggerKind spelling against supported kinds
  2. Upgrade windmill-yaml-validator to a version that supports the kind
  3. Log target.triggerKind — 'undefined' means the field is missing

Example fix

// before
validate(doc, { type: 'trigger', triggerKind: 'schdeule' })
// after
validate(doc, { type: 'trigger', triggerKind: 'schedule' })
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED = ['http','websocket','postgres','kafka','nats','mqtt','s3','schedule','email'];
if (target.type === 'trigger' && !SUPPORTED.includes(target.triggerKind)) {
  throw new Error(`Trigger kind not supported by this validator: ${target.triggerKind}`);
}

Type guard

function hasKnownTriggerKind(t: { triggerKind?: string }): boolean { return typeof t.triggerKind === 'string' && t.triggerKind in validator.validateTrigger; }

Try / catch

try {
  result = validator.validate(doc, target);
} catch (e) {
  if (e.message.startsWith('Unsupported trigger kind')) {
    console.error('Unknown/unsupported triggerKind — check spelling or upgrade validator:', target.triggerKind);
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling validate(doc, { type: 'trigger', triggerKind: X }) where X is misspelled, undefined, or a kind this validator version does not recognize.

Common situations: 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'.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/4f4d9572d54462a5. Report an issue: GitHub.