{"record":{"id":"a229c14d22029a82","repo":"gitroomhq/postiz-app","slug":"no-postiz-account-found-for-this-email","errorCode":null,"errorMessage":"No Postiz account found for this email","messagePattern":"No Postiz account found for this email","errorType":"http","errorClass":"HttpException","httpStatus":400,"severity":"error","filePath":"libraries/nestjs-libraries/src/database/prisma/organizations/organization.service.ts","lineNumber":122,"sourceCode":"\n  async addTeamMemberByEmail(org: Organization, body: AdminAddTeamMemberDto) {\n    const tier =\n      // @ts-ignore\n      org?.subscription?.subscriptionTier ||\n      (!process.env.STRIPE_PUBLISHABLE_KEY ? 'ULTIMATE' : 'FREE');\n\n    if (!pricing[tier].team_members) {\n      throw new HttpException(\n        'The organization plan does not include team members',\n        400\n      );\n    }\n\n    const users = await this._organizationRepository.getUsersByEmail(\n      body.email\n    );\n    if (!users.length) {\n      throw new HttpException('No Postiz account found for this email', 400);\n    }\n\n    if (users.length > 1) {\n      throw new HttpException(\n        'Multiple accounts exist for this email (different login providers)',\n        400\n      );\n    }\n\n    const [user] = users;\n\n    const userOrgs = await this._organizationRepository.getOrgsByUserId(\n      user.id\n    );\n    if (userOrgs.some((current) => current.id === org.id)) {\n      throw new HttpException(\n        'User is already a member of this organization',\n        400","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/gitroomhq/postiz-app/blob/0f1647f7491a217d43eb5ae7a480484bdf0aff3e/libraries/nestjs-libraries/src/database/prisma/organizations/organization.service.ts#L104-L140","documentation":"Thrown as HTTP 400 when inviting a team member by email and getUsersByEmail returns no user accounts. Postiz only allows inviting existing users — there is no invite-by-email signup flow here.","triggerScenarios":"Calling addTeamMemberByEmail with an email that has never registered on this Postiz instance (wrong server, typo, or unregistered collaborator).","commonSituations":"Trying to invite someone who hasn't signed up yet; typo in the email; user registered on a different deployment (self-hosted vs cloud); case/whitespace differences if lookup is exact-match.","solutions":["Have the collaborator create a Postiz account first, then retry the invite","Double-check the email spelling and trim whitespace","Confirm you're both on the same Postiz instance"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const users = await lookupUsersByEmail(email);\nif (!users.length) { showInviteBlockedMessage(); return; }","typeGuard":"const userExists = (users: unknown[]): users is [User] => users.length === 1;","tryCatchPattern":"try { await addTeamMember(orgId, email); } catch (e) { if (/No Postiz account/.test(e.message)) { showNotice('User must sign up first'); return; } throw e; }","preventionTips":["Trim and validate email input before inviting","Confirm both parties use the same Postiz instance"],"tags":["team-members","invite","user-not-found"],"backgroundTag":"user-not-found","analyzedSha":"0f1647f7491a217d43eb5ae7a480484bdf0aff3e","analyzedAt":"2026-08-27T12:09:55.020Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}