{"record":{"id":"a888481af53ec7d6","repo":"overleaf/overleaf","slug":"warning-the-invite-list-has-reached-the-membershi","errorCode":null,"errorMessage":"WARNING: the invite list has reached the membership limit (newTotalCount > membersLimit)","messagePattern":"WARNING: the invite list has reached the membership limit \\(newTotalCount > membersLimit\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"services/web/scripts/add_subscription_members_csv.mjs","lineNumber":114,"sourceCode":"        subscriptionId,\n        emailList,\n        { removeMembersNotIncluded }\n      )\n  } catch (error) {\n    if (error instanceof InvalidEmailError) {\n      console.error(`${filename} contains invalid email addresses:`)\n      console.error(error.info?.invalidEmails.join(','))\n      process.exit(1)\n    } else {\n      throw error\n    }\n  }\n\n  console.log('Result Preview:')\n  logResult(previewResult)\n\n  if (previewResult.newTotalCount > previewResult.membersLimit) {\n    console.warn(\n      'WARNING: the invite list has reached the membership limit (newTotalCount > membersLimit)'\n    )\n    if (commit) {\n      console.error(`Invites won't be sent and users won't be deleted`)\n    }\n    process.exit(1)\n  }\n\n  if (!commit) {\n    console.log(\n      'this is a dry-run, use the --commit option to send the invite and make any DB changes'\n    )\n    return\n  }\n\n  console.log(\n    `Sending invites to ${previewResult.emailsToSendInvite.length} email addresses`\n  )","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/overleaf/overleaf/blob/28ad3b03b71cb4311decdcb55c36b33ec10d72db/services/web/scripts/add_subscription_members_csv.mjs#L96-L132","documentation":"Preview-stage warning in the CSV invite script: the dry-run result shows the invite list would push the subscription over its member limit (newTotalCount > membersLimit). The operator is warned before any commit so they can trim the list, raise the limit, or accept the overage deliberately.","triggerScenarios":"Thrown at services/web/scripts/add_subscription_members_csv.mjs:114 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Trim the CSV to fit within membersLimit","Purchase additional seats / raise the limit before committing","Review the script's follow-up prompt so the overage is only continued intentionally"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"28ad3b03b71cb4311decdcb55c36b33ec10d72db","analyzedAt":"2026-09-03T02:10:22.807Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}