{"record":{"id":"8ca1b371072fba06","repo":"windmill-labs/windmill","slug":"invalid-value-for-auto-invite-mode-valid-values-a","errorCode":null,"errorMessage":"Invalid value for auto_invite.mode. Valid values are \"invite\" and \"add\"","messagePattern":"Invalid value for auto_invite\\.mode\\. Valid values are \"invite\" and \"add\"","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/core/settings.ts","lineNumber":242,"sourceCode":"  log.debug(`Workspace settings are not up-to-date, updating...`);\n\n  if (localSettings.webhook !== settings.webhook) {\n    log.debug(`Updating webhook...`);\n    await wmill.editWebhook({\n      workspace,\n      requestBody: {\n        webhook: localSettings.webhook,\n      },\n    });\n  }\n\n  // Handle auto_invite using grouped format\n  if (!deepEqual(localSettings.auto_invite, settings.auto_invite)) {\n    log.debug(`Updating auto invite...`);\n\n    const localAutoInvite = localSettings.auto_invite;\n    if (localAutoInvite?.mode && ![\"add\", \"invite\"].includes(localAutoInvite.mode)) {\n      throw new Error(\n        `Invalid value for auto_invite.mode. Valid values are \"invite\" and \"add\"`\n      );\n    }\n    try {\n      await wmill.editAutoInvite({\n        workspace,\n        requestBody: localAutoInvite?.enabled\n          ? {\n              operator: localAutoInvite.operator ?? false,\n              invite_all: true,\n              auto_add: localAutoInvite.mode === \"add\",\n            }\n          : {},\n      });\n    } catch (_) {\n      // on cloud\n      log.debug(\n        `Auto invite is not possible on cloud, only auto-inviting same domain...`","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/core/settings.ts#L224-L260","documentation":"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.","triggerScenarios":"Thrown at cli/src/core/settings.ts:242 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set auto_invite.mode to \"invite\" or \"add\" in wmill.yaml.","Check for typos or capitalized values."],"exampleFix":null,"handlingStrategy":"validation","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-08T15:18:49.778Z"}