{"record":{"id":"473e76120a92b0c4","repo":"toeverything/AFFiNE","slug":"invalid-invite-id","errorCode":null,"errorMessage":"Invalid invite id","messagePattern":"Invalid invite id","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/frontend/core/src/modules/cloud/services/invitation.ts","lineNumber":62,"sourceCode":"        }),\n        catchErrorInto(this.error$),\n        onStart(() => {\n          this.inviteId$.setValue(inviteId);\n          this.loading$.setValue(true);\n          this.inviteInfo$.setValue(undefined);\n        }),\n        onComplete(() => {\n          this.loading$.setValue(false);\n        })\n      );\n    })\n  );\n\n  async acceptInvite(inviteId: string) {\n    this.getInviteInfo({ inviteId });\n    await this.loading$.waitFor(f => !f);\n    if (!this.inviteInfo$.value) {\n      throw new Error('Invalid invite id');\n    }\n    return await this.acceptInviteStore.acceptInvite(\n      this.inviteInfo$.value.workspace.id,\n      inviteId\n    );\n  }\n\n  override dispose(): void {\n    this.getInviteInfo.unsubscribe();\n  }\n}\n","sourceCodeStart":44,"sourceCodeEnd":74,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/packages/frontend/core/src/modules/cloud/services/invitation.ts#L44-L74","documentation":"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.","triggerScenarios":"Thrown in acceptInvite when, after fetching invite info, inviteInfo$ is still empty, meaning the invite id did not resolve to a valid workspace invitation.","commonSituations":"Occurs when opening an expired, revoked, or mistyped workspace invite link. Ask the inviter for a fresh invitation link.","solutions":["Use the invite id from a valid invitation link.","Request a new invitation if the link is malformed or expired."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b4c8548c09da21b2898443559a5b846f0ccf5dd8","analyzedAt":"2026-08-18T21:16:52.546Z","contentChangedAt":"2026-08-18T21:16:52.546Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}