The join endpoint returns an error shape the frontend cannot read
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
Research direction
Read apps/http-server/src/controllers/sessionController.ts and the shared apps/http-server/src/utils/error.ts helper, then search the service for raw res.status(...).json({ message }) calls on error paths. Replace the join endpoint response with the shared helper and check that the join screen reads the server message. Done when all http-server errors use { success: false, error: string } and no raw message-shaped error responses remain.
Written by the indexing model from the issue text.
Description
Every error in http-server goes through a shared helper:
// apps/http-server/src/utils/error.ts
export const errorResponse = (res: Response, statusCode: number, message: string) => {
return res.status(statusCode).json({ success: false, error: message })
}
One line does not:
// apps/http-server/src/controllers/sessionController.ts:15
if (!code || !username) {
return res.status(400).json({ message: "Code and username are required" });
}
Confirmed against the live API:
POST /api/v1/session/join {}
→ {"message":"Code and username are required"} # every other endpoint sends {success, error}
Why it matters
It is not only inconsistent — the message is silently dropped. The join screen reads .error:
// apps/frontend/src/screens/JoinQuiz.tsx
type JoinRequestError = { response?: { data?: { error?: string } } };
...
setError(joinError.response?.data?.error || "Failed to join quiz");
The server sends .message, so the fallback always wins and the user sees the generic "Failed to join quiz" instead of what actually went wrong.
The join screen validates client-side first, so today this mostly affects direct API calls and anything that bypasses the form — but it is a real swallowed message, and the inconsistency is a trap for the next person who adds an endpoint here.
What a fix looks like
return errorResponse(res, 400, "Code and username are required");
Then check the rest of the service for other raw res.json calls on error paths. The convention is well established — errorResponse is used 22 times in quizController, 9 in authController, 7 in inviteController, 5 elsewhere in sessionController — so anything else that does not use it is probably the same oversight.
Definition of done
- Every error response from
http-serverhas the shape{ success: false, error: string } - The join screen shows the server's message rather than its fallback
- No other raw
res.status(...).json({ message })remains on an error path
Good first issue: one line to fix, and a good way to learn a codebase convention by finding where it was not followed.
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 7
- Avg merge
- 3h 39m
- Merged PRs (30d)
- 16
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TheCodeHeist-Coder/Rexial
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
TheCodeHeist-Coder/Rexial#195 ·
Maintainers usually reply within 1 day
-
Backend first issue bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
TheCodeHeist-Coder/Rexial#193 ·
Maintainers usually reply within 1 day
-
Backend first issue bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
TheCodeHeist-Coder/Rexial#191 ·
Maintainers usually reply within 1 day
-
good first issue help wanted UI & UX
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
TheCodeHeist-Coder/Rexial#190 ·
Maintainers usually reply within 1 day
-
Backend first issue good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheCodeHeist-Coder/Rexial#188 ·
Maintainers usually reply within 1 day
All issues in TheCodeHeist-Coder/Rexial
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
openclaw/openclaw#182077 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
aikido high security
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dequelabs/axe-linter-action#161 ·
-
[Feature Request] Update the DimCode agent icon to the 45:32 brand markPossibly taken @eric8810 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
lyswhut/lx-music-desktop#3026 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
abhigyanpatwari/GitNexus#3704 ·
Maintainers usually reply within 1 day