Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/routes/rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ router.post('/verify-password', roomPasswordLimiter, async (req, res) => {
const { roomId, password } = req.body;

// ── Basic validation ─────────────────────────────────────────────────────
if (!roomId || typeof roomId !== 'string' || roomId.trim() === '') {
if (!roomId || typeof roomId !== 'string' || roomId.trim().length === 0) {
return res.status(400).json({ error: 'roomId is required.' });
}
if (!password || typeof password !== 'string' || password.trim() === '') {
Expand Down
2 changes: 2 additions & 0 deletions src/components/Landing/ContributorsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,5 @@ export default function ContributorsPage() {
</div>
);
}

.catch(err => console.error("Promise.all failed:", err));
Comment on lines +250 to +251

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Remove the dangling .catch expression.

Line 251 is invalid JavaScript because it starts a member-expression continuation after the component code. The existing try/catch around Promise.all already logs and handles the rejection at Lines 37-39.

Proposed fix
- .catch(err => console.error("Promise.all failed:", err));
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.catch(err => console.error("Promise.all failed:", err));
🧰 Tools
🪛 Biome (2.5.6)

[error] 251-251: Expected a statement but instead found '.catch(err => console.error("Promise.all failed:", err))'.

(parse)

🪛 GitHub Actions: Lighthouse CI / 0_lighthouse.txt

[error] 251-251: Vite build failed: Unexpected token at the beginning of the .catch(err => console.error("Promise.all failed:", err)); statement. Command 'npm run build' failed with exit code 1.

🪛 GitHub Actions: Lighthouse CI / lighthouse

[error] 251-251: Vite build failed during transformation due to an unexpected token at the start of a chained .catch() expression. Command 'npm run build' failed with exit code 1.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/Landing/ContributorsPage.jsx` around lines 250 - 251, Remove
the dangling .catch expression after the component code in ContributorsPage,
since the existing try/catch surrounding Promise.all already handles and logs
rejections.

Source: Linters/SAST tools

Loading