gitroomhq/postiz-app · error · HttpException

No Postiz account found for this email

Error message

No Postiz account found for this email

What it means

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.

Source

Thrown at libraries/nestjs-libraries/src/database/prisma/organizations/organization.service.ts:122

  async addTeamMemberByEmail(org: Organization, body: AdminAddTeamMemberDto) {
    const tier =
      // @ts-ignore
      org?.subscription?.subscriptionTier ||
      (!process.env.STRIPE_PUBLISHABLE_KEY ? 'ULTIMATE' : 'FREE');

    if (!pricing[tier].team_members) {
      throw new HttpException(
        'The organization plan does not include team members',
        400
      );
    }

    const users = await this._organizationRepository.getUsersByEmail(
      body.email
    );
    if (!users.length) {
      throw new HttpException('No Postiz account found for this email', 400);
    }

    if (users.length > 1) {
      throw new HttpException(
        'Multiple accounts exist for this email (different login providers)',
        400
      );
    }

    const [user] = users;

    const userOrgs = await this._organizationRepository.getOrgsByUserId(
      user.id
    );
    if (userOrgs.some((current) => current.id === org.id)) {
      throw new HttpException(
        'User is already a member of this organization',
        400

View on GitHub (pinned to 0f1647f749)

Solutions

  1. Have the collaborator create a Postiz account first, then retry the invite
  2. Double-check the email spelling and trim whitespace
  3. Confirm you're both on the same Postiz instance
Defensive patterns

Strategy: validation

Validate before calling

const users = await lookupUsersByEmail(email);
if (!users.length) { showInviteBlockedMessage(); return; }

Type guard

const userExists = (users: unknown[]): users is [User] => users.length === 1;

Try / catch

try { await addTeamMember(orgId, email); } catch (e) { if (/No Postiz account/.test(e.message)) { showNotice('User must sign up first'); return; } throw e; }

Prevention

When it happens

Trigger: Calling addTeamMemberByEmail with an email that has never registered on this Postiz instance (wrong server, typo, or unregistered collaborator).

Common situations: 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.

Understand the failure class

Background: "User not found", "Invalid user", and "does not exist": what missing-user lookup errors mean across Rocket.Chat, LiteLLM, Phabricator, rustfs, and pnpm — this error's family across 10 libraries.

Related errors


AI-assisted analysis of gitroomhq/postiz-app@0f1647f749 (2026-08-27). Data as JSON: /api/errors/a229c14d22029a82. Report an issue: GitHub.