diff --git a/server/account/src/utils.ts b/server/account/src/utils.ts index e6be70ad8d1..3a960469093 100644 --- a/server/account/src/utils.ts +++ b/server/account/src/utils.ts @@ -1105,13 +1105,11 @@ export async function createWorkspaceRecord ( export async function checkInvite (ctx: MeasureContext, invite: WorkspaceInvite, email: string): Promise { if (invite.remainingUses === 0) { ctx.error('Invite limit exceeded', { email, ...invite }) - Analytics.handleError(new Error(`Invite limit exceeded ${email}`)) throw new PlatformError(new Status(Severity.ERROR, platform.status.Forbidden, {})) } if (invite.expiresOn > 0 && invite.expiresOn < Date.now()) { ctx.error('Invite link expired', { email, ...invite }) - Analytics.handleError(new Error(`Invite link expired ${invite.id} ${email}`)) throw new PlatformError(new Status(Severity.ERROR, platform.status.ExpiredLink, {})) } @@ -1129,7 +1127,6 @@ export async function checkInvite (ctx: MeasureContext, invite: WorkspaceInvite, if (invite.email != null && invite.email.trim().length > 0 && invite.email !== email) { ctx.error("Invite doesn't allow this email address", { email, ...invite }) - Analytics.handleError(new Error(`Invite link email check failed ${invite.id} ${email} ${invite.email}`)) throw new PlatformError(new Status(Severity.ERROR, platform.status.Forbidden, {})) }