windmill-labs/windmill · error

Invalid value for auto_invite.mode. Valid values are "invite

Error message

Invalid value for auto_invite.mode. Valid values are "invite" and "add"

What it means

pushWorkspaceSettings validates the local auto_invite settings before calling the remote API: auto_invite.mode must be either "invite" (send invitation emails) or "add" (add users directly); any other string is rejected.

Source

Thrown at cli/src/core/settings.ts:242

  log.debug(`Workspace settings are not up-to-date, updating...`);

  if (localSettings.webhook !== settings.webhook) {
    log.debug(`Updating webhook...`);
    await wmill.editWebhook({
      workspace,
      requestBody: {
        webhook: localSettings.webhook,
      },
    });
  }

  // Handle auto_invite using grouped format
  if (!deepEqual(localSettings.auto_invite, settings.auto_invite)) {
    log.debug(`Updating auto invite...`);

    const localAutoInvite = localSettings.auto_invite;
    if (localAutoInvite?.mode && !["add", "invite"].includes(localAutoInvite.mode)) {
      throw new Error(
        `Invalid value for auto_invite.mode. Valid values are "invite" and "add"`
      );
    }
    try {
      await wmill.editAutoInvite({
        workspace,
        requestBody: localAutoInvite?.enabled
          ? {
              operator: localAutoInvite.operator ?? false,
              invite_all: true,
              auto_add: localAutoInvite.mode === "add",
            }
          : {},
      });
    } catch (_) {
      // on cloud
      log.debug(
        `Auto invite is not possible on cloud, only auto-inviting same domain...`

View on GitHub (pinned to e474e8803c)

Solutions

  1. Set auto_invite.mode to "invite" or "add" in wmill.yaml.
  2. Check for typos or capitalized values.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cli/src/core/settings.ts:242 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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