plandex-ai/plandex · error
Error validating email verification:
Error message
Error validating email verification:
What it means
Before creating the account, the handler calls db.ValidateEmailVerification(email, pin). If verification fails (unknown email, wrong/expired PIN, missing verification record), it responds 500 with `Error validating email verification: <detail>`. This is skipped in development local mode.
Source
Thrown at app/server/handlers/accounts.go:56
var req shared.CreateAccountRequest
err = json.Unmarshal(body, &req)
if err != nil {
log.Printf("Error unmarshalling request: %v\n", err)
http.Error(w, "Error unmarshalling request: "+err.Error(), http.StatusInternalServerError)
return
}
req.Email = strings.ToLower(req.Email)
var emailVerificationId string
// skipping email verification in dev/local mode
if !isLocalMode {
emailVerificationId, err = db.ValidateEmailVerification(req.Email, req.Pin)
if err != nil {
log.Printf("Error validating email verification: %v\n", err)
http.Error(w, "Error validating email verification: "+err.Error(), http.StatusInternalServerError)
return
}
}
var apiErr *shared.ApiError
var user *db.User
var userId string
var token string
var orgId string
err = db.WithTx(r.Context(), "create account", func(tx *sqlx.Tx) error {
res, err := db.CreateAccount(req.UserName, req.Email, emailVerificationId, tx)
if err != nil {
return fmt.Errorf("error creating account: %v", err)
}
user = res.UserView on GitHub (pinned to e2d772072e)
Solutions
- Re-request the verification email/PIN and submit the newest code
- Double-check the email address matches the one verification was issued for
- Verify the email_verification table has a row for this email and that it is unexpired
- For local dev, set GOENV=development and LOCAL_MODE=1 to bypass verification
Example fix
// before
{ "email": "user@example.com", "pin": "123456" } // old/expired pin
// after
requestNewVerificationPin("user@example.com")
// then submit the fresh pin Defensive patterns
Strategy: validation
Validate before calling
if email == "" || pin == "" {
return errors.New("email and verification pin are required")
}
// ensure a verification was requested recently for this email Prevention
- Submit the newest PIN and re-request after expiry
- Confirm email spelling matches the verification record
- Use LOCAL_MODE=1 only in development
When it happens
Trigger: POSTing a create-account request with a PIN that does not match the code emailed to the user, an email that never started verification, or a verification record that expired.
Common situations: Users mistyping the 4-6 digit PIN; waiting past the verification expiry window; requesting a new code and submitting the old one; running against a database missing the email_verification row.
Related errors
- Error getting org:
- Error getting user:
- Failed to fetch custom models:
- err.Error()
- Error updating default plan config
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/56b936e72af74a90.
Report an issue: GitHub.