toeverything/AFFiNE · error · Error
Invalid invite id
Error message
Invalid invite id
What it means
acceptInvite throws after getInviteInfo + loading completes because inviteInfo$ was never populated, meaning the invite id is malformed or no longer resolvable on the server. It is a client-side sentinel guard against proceeding with a null invite before accepting.
Source
Thrown at packages/frontend/core/src/modules/cloud/services/invitation.ts:62
}),
catchErrorInto(this.error$),
onStart(() => {
this.inviteId$.setValue(inviteId);
this.loading$.setValue(true);
this.inviteInfo$.setValue(undefined);
}),
onComplete(() => {
this.loading$.setValue(false);
})
);
})
);
async acceptInvite(inviteId: string) {
this.getInviteInfo({ inviteId });
await this.loading$.waitFor(f => !f);
if (!this.inviteInfo$.value) {
throw new Error('Invalid invite id');
}
return await this.acceptInviteStore.acceptInvite(
this.inviteInfo$.value.workspace.id,
inviteId
);
}
override dispose(): void {
this.getInviteInfo.unsubscribe();
}
}
View on GitHub (pinned to b4c8548c09)
Solutions
- Use the invite id from a valid invitation link.
- Request a new invitation if the link is malformed or expired.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown in acceptInvite when, after fetching invite info, inviteInfo$ is still empty, meaning the invite id did not resolve to a valid workspace invitation.
Common situations: Occurs when opening an expired, revoked, or mistyped workspace invite link. Ask the inviter for a fresh invitation link.
AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18).
Data as JSON: /api/errors/473e76120a92b0c4.
Report an issue: GitHub.