hcengineering/platform · info · PlatformError

platform.status.SocialIdNotFound

platform.status.SocialIdNotFound

Error message

SocialIdNotFound

What it means

requestPasswordReset looks up the social id record for the normalized email via `getEmailSocialId`. If none exists — no account was ever registered with that email (of type EMAIL) — it throws SocialIdNotFound with the email as `value`. The server deliberately does not reveal 'no such user' differently for this flow, but the status codes do.

Source

Thrown at server/account/src/operations.ts:1510

  branding: Branding | null,
  _token: string,
  params: { email: string }
): Promise<void> {
  const { email } = params

  if (email == null || email === '') {
    throw new PlatformError(new Status(Severity.ERROR, platform.status.BadRequest, {}))
  }

  const normalizedEmail = cleanEmail(email)

  ctx.info('Requesting password reset', { email, normalizedEmail })

  const emailSocialId = await getEmailSocialId(db, normalizedEmail)

  if (emailSocialId == null) {
    ctx.error('Email social id not found', { email, normalizedEmail })
    throw new PlatformError(
      new Status(Severity.ERROR, platform.status.SocialIdNotFound, { value: email, type: SocialIdType.EMAIL })
    )
  }

  const account = await getAccount(db, emailSocialId.personUuid as AccountUuid)

  if (account == null) {
    ctx.info('Account not found', { email, normalizedEmail })
    throw new PlatformError(
      new Status(Severity.ERROR, platform.status.AccountNotFound, { account: emailSocialId.personUuid })
    )
  }

  const { mailURL, mailAuth } = getMailUrl()
  const front = getFrontUrl(branding)

  const token = generateToken(account.uuid, undefined, {
    restoreEmail: normalizedEmail

View on GitHub (pinned to 63e28dc964)

Solutions

  1. Verify the email is spelled correctly and is the one used at signup.
  2. If the account was created via social login, sign in with that provider instead (no local password exists to reset).
  3. Sign up a new account if the email was never registered.
  4. Check the socialIds collection for a record with type EMAIL and that value matches cleanEmail(email).
Defensive patterns

Strategy: try-catch

Try / catch

try { await requestPasswordReset(ctx, token, { email }) } catch (err) { if (isStatusError(err, platform.status.SocialIdNotFound)) show('No account with this email. Try signing up or signing in with a social provider.'); else throw err }

Prevention

When it happens

Trigger: Requesting a password reset for an email that has no EMAIL social id: never-registered email, account registered only via Google/GitHub (different social id type), email typo, or casing/format variant that cleanEmail did not normalize to the stored value.

Common situations: User tries to reset password for an OAuth-only account; user mistypes domain (gmial.com) or uses an alias not on file; account deleted earlier; email stored with different normalization (older accounts pre-normalization).

Related errors


AI-assisted analysis of hcengineering/platform@63e28dc964 (2026-08-29). Data as JSON: /api/errors/56645f8d0007c2e9. Report an issue: GitHub.