{"record":{"id":"1a612872f0635ac9","repo":"windmill-labs/windmill","slug":"opts-kind-trigger-triggerpath-not-found","errorCode":null,"errorMessage":"${opts.kind} trigger ${triggerPath} not found","messagePattern":"(.+?) trigger (.+?) not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/trigger/trigger.ts","lineNumber":698,"sourceCode":"    \"Trigger kind (required: http, websocket, kafka, nats, postgres, mqtt, amqp, sqs, gcp, azure, email)\"\n  )\n  .action((async (opts: any, triggerPath: string, email: string) => {\n    const workspace = await resolveWorkspace(opts);\n    await requireLogin(opts);\n\n    if (!opts.kind) {\n      throw new Error(\"--kind is required. Valid kinds: \" + TRIGGER_TYPES.join(\", \"));\n    }\n    if (!checkIfValidTrigger(opts.kind)) {\n      throw new Error(\"Invalid trigger kind: \" + opts.kind + \". Valid kinds: \" + TRIGGER_TYPES.join(\", \"));\n    }\n\n    const { lookupUsernameByEmail } = await import(\"../../core/permissioned_as.ts\");\n    const cache = new Map<string, { username: string; email: string }>();\n    const username = await lookupUsernameByEmail(workspace.workspaceId, email, cache);\n\n    const remote = await getTrigger(opts.kind as TriggerType, workspace.workspaceId, triggerPath);\n    if (!remote) throw new Error(`${opts.kind} trigger ${triggerPath} not found`);\n\n    await updateTrigger(opts.kind, workspace.workspaceId, triggerPath, {\n      ...(remote as any),\n      permissioned_as: `u/${username}`,\n      preserve_permissioned_as: true,\n      path: triggerPath,\n    } as any);\n    log.info(colors.green(\n      `Updated permissioned_as for ${opts.kind} trigger ${triggerPath} to ${email} (username: ${username})`\n    ));\n  }) as any);\n\nexport default command;\n","sourceCodeStart":680,"sourceCodeEnd":712,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/trigger/trigger.ts#L680-L712","documentation":"Thrown by the trigger token-granting command (trigger path + email form) when the remote reports that the specified trigger does not exist under the given --kind. The command already validated that --kind was supplied and is one of the valid kinds, so this error reflects a mismatch between the given triggerPath/kind and actual remote state — typically a mistyped path or a trigger that was never deployed.","triggerScenarios":"Thrown at cli/src/commands/trigger/trigger.ts:698 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify --kind matches the actual trigger type and the path is correct.","List triggers with `wmill trigger list --kind <kind>` to find the right path."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}