chore(login): Add error message for invalid password#1104
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe login form component now tracks and displays sign-in errors. ChangesError Handling in Sign-In Form
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with 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.
Inline comments:
In `@apps/web/app/routes/auth/login.tsx`:
- Around line 63-71: The onSubmit handler currently exposes raw backend error
text and doesn't catch thrown exceptions; update the onSubmit function (which
uses signInEmailPasswordSchema, authClient.signIn.email, and setErrorMessage) to
wrap the auth call in try/catch, normalize any error to a generic message like
"Invalid credentials" (instead of using error.message), setErrorMessage to that
generic message on both returned errors and thrown exceptions, and optionally
log the original error internally for diagnostics without showing it to the
user.
- Line 53: Convert the function declaration LoginEmailPassword into a typed
const arrow component and add the React import: change the declaration to a
const with React.FC typing (e.g., const LoginEmailPassword: React.FC = () => {
... }) and add either import React from "react" or import type { FC } from
"react" at the top; keep the existing component body and exports unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 135c96bb-8fdc-4b54-845d-2d6c872b055b
📒 Files selected for processing (1)
apps/web/app/routes/auth/login.tsx
We don't currently show any errors if the password is invalid which makes it hard to tell if the app is responding. Adding a small error message showing when creds are invalid
Screen.Recording.2026-05-05.at.2.08.41.PM.mov
Summary by CodeRabbit