Skip to content

Fix WEBSITE-3F: Guard against invalid speedrun categories - #382

Open
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/website-3f-invalid-category
Open

Fix WEBSITE-3F: Guard against invalid speedrun categories#382
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/website-3f-invalid-category

Conversation

@seer-by-sentry

Copy link
Copy Markdown

This PR addresses WEBSITE-3F, an error occurring when an invalid static category is provided in the URL for speedrun leaderboards (e.g., /leaderboards/team/vaultofglass/speedrun/duo).

The root cause was that src/app/leaderboards/team/[raid]/speedrun/[category]/page.tsx had dynamicParams = true but lacked validation for the category parameter against the SpeedrunVariables mapping. This allowed invalid categories to be passed down, eventually causing an error in src/services/speedrun-com/getSpeedrunComLeaderboard.ts when attempting to look up a non-existent variable value.

The solution adds a notFound() guard in page.tsx to check if params.category is a valid key within SpeedrunVariables[raid.path].variable.values. If it's not valid, the page now correctly returns a 404, preventing the downstream error.

Fixes WEBSITE-3F

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
raid-hub Error Error Jun 26, 2026 11:13pm

Request Review

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