Skip to content

fix(website): return 404 for missing profiles - #550

Open
shoemoney wants to merge 1 commit into
supabase:masterfrom
shoemoney:fix/profile-not-found
Open

shoemoney wants to merge 1 commit into
supabase:masterfrom
shoemoney:fix/profile-not-found

Conversation

@shoemoney

Copy link
Copy Markdown

An unknown handle currently renders an empty profile page because prefetchQuery swallows the NotFoundError that getStaticProps expects to catch.

Use fetchQuery for the required profile data so the existing 404 handler runs. Successful profiles still hydrate the same cache entry, and other API errors propagate. Also check that a user is signed in before comparing IDs: two missing IDs currently make the loading page show Edit profile to anonymous visitors.

Fixes #80. Also addresses the profile behavior in #173; the missing FAQ page is outside this change.

Three regressions fail on the original code. All seven new integration tests pass with the fix, using the real QueryClient and mocked RPC responses. The full website coverage suite passes with TZ=UTC pnpm run test:coverage (31 tests). TypeScript passes after pnpm exec fumadocs-mdx generates the docs types, and the changed files pass Prettier and git diff --check. UTC matches CI and avoids an existing timestamp assertion that depends on the local timezone. A production build and browser checks weren't run.

Prepared with AI assistance. Tests use no live Supabase resources.

@vercel

vercel Bot commented Nov 28, 2026

Copy link
Copy Markdown

@shoemoney is attempting to deploy a commit to the Supabase Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

Visiting database.dev/<user> shows a profile page for <user> even if the user doesn't exist

1 participant