Skip to content

Fix: Show friendly message when invitation link has no id - #363

Draft
posthog-eu[bot] wants to merge 1 commit into
mainfrom
posthog-self-driving/fixinvitations-stop-crashing-accept-989a02
Draft

posthog-eu[bot] wants to merge 1 commit into
mainfrom
posthog-self-driving/fixinvitations-stop-crashing-accept-989a02

Conversation

@posthog-eu

@posthog-eu posthog-eu Bot commented Sep 10, 2026

Copy link
Copy Markdown

Problem

  • A user who opens the invitation accept page without an id in the URL sees a full-app crash screen instead of guidance, in the signup and team-joining flow.
  • apps/project/src/pages/invitations/accept.tsx did throw new Error("id not supplied") in the render path. Nothing caught it locally, so it reached the top-level ErrorBoundary in apps/project/src/main.tsx, which swaps the whole app for a raw ErrorAlert.
  • The same component already handles bad invites gracefully (NTFND, DNIED, LOGIN). The missing-id case just never got the same treatment.

Changes

  • Replace the throw with an inline "this invitation link is not valid" state, matching the existing NTFND copy, plus a link back to the app.
  • Render it inside the normal SharedLayout (navbar + footer), so the page stays intact.
  • No other change needed: the query is already paused via pause: !id, so this path makes no backend call.

Verification

  • tsc -b and eslint pass for the project app.
  • Loaded /invitations/accept with no query string in a browser: the page now shows the friendly message and a "Back to the app" button, with no crash.

Before: throw → top-level ErrorBoundary → whole app replaced by ErrorAlert.
After: friendly inline state within the normal layout.


Created with PostHog Desktop from this inbox report.

The invitation accept page threw an error in the render path when the URL had no `id`. The throw reached the top-level ErrorBoundary, which replaced the whole app with a raw error screen.

Now the page renders an inline "this invitation link is not valid" state, matching the existing NTFND copy, with a link back to the app. The query is already paused when `id` is missing, so no backend call is needed.

Generated-By: PostHog Desktop
Task-Id: 660c5e64-310a-4986-8541-cdbccd4a5eda
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants