You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Appeal page shows a blank page or no message when login or the ban check fails #294
Files:src/pages/appeal.tsx (exchangeCodeForToken at line 124, checkBan, and the render branches from line 554)
Problem. Two failure paths leave the user with nothing to go on:
Failed login. If /api/v2/keycloak/token fails or returns no access_token, the catch at line 152 ignores it. The page falls back to the "log in" screen with no message, and ?code=… stays in the URL. Before Pass the Keycloak client ID to next build (WEB-031) #266, every ban-appeal login failed exactly like this, and users had no way to tell.
Failed ban check. If any call in checkBan() fails (/users/banned, or getting a token), banStatus becomes "unknown". The page only renders branches for can_appeal, can_reappeal, has_appeal and not_banned, so a logged-in user sees the header and footer with an empty page in between.
Separately, the alert colour is chosen by message.includes("submitted") || message.includes("success"), so a server message worded differently shows as an error.
Fix.
Show an error with a retry or "log in again" button for both paths, and remove the spent code from the URL.
Add a branch for token && banStatus === "unknown".
Track success and error explicitly instead of matching on message text.
Done when. With the token or ban endpoint returning 500, the page explains what went wrong and offers a next step.
Activity