overleaf/overleaf · error
invalid_email
Error message
invalid_email
What it means
Validation branch in inviteToProject: EmailHelper.parseEmail returned null/empty for the submitted invite email address, so the invite request is rejected with 400 and errorReason 'invalid_email' before any invite is created.
Source
Thrown at services/web/app/src/Features/Collaborators/CollaboratorsInviteController.mjs:144
} else {
allowed = await LimitationsManager.promises.canAddXEditCollaborators(
projectId,
1
)
}
if (!allowed) {
logger.debug(
{ projectId, email, sendingUserId },
'not allowed to invite more users to project'
)
return res.json({ invite: null })
}
email = EmailHelper.parseEmail(email, true)
if (email == null || email === '') {
logger.debug({ projectId, email, sendingUserId }, 'invalid email address')
return res.status(400).json({ errorReason: 'invalid_email' })
}
const underRateLimit =
await CollaboratorsInviteController._checkRateLimit(sendingUserId)
if (!underRateLimit) {
return res.sendStatus(429)
}
const shouldAllowInvite =
await CollaboratorsInviteController._checkShouldInviteEmail(email)
if (!shouldAllowInvite) {
logger.debug(
{ email, projectId, sendingUserId },
'not allowed to send an invite to this email address'
)
return res.json({
invite: null,
error: 'cannot_invite_non_user',View on GitHub (pinned to 28ad3b03b7)
Solutions
- Correct the email address syntax and resubmit
- Trim/clean the input before sending the request
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at services/web/app/src/Features/Collaborators/CollaboratorsInviteController.mjs:144 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of overleaf/overleaf@28ad3b03b7 (2026-09-03).
Data as JSON: /api/errors/01c856a9d96ba170.
Report an issue: GitHub.