fix: display backend error on password reset failure (#504) - #538
RounakKumarAgarwal wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe password reset confirmation error now uses the backend’s ChangesPassword reset error handling
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to The password-reset flow now surfaces specific backend failures while retaining message and generic fallbacks, with no remaining merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Description
Fixes #504
The password-reset flow (
confirmForgotPassword) readdata.message, but the backend returns errors underdata.error— so users saw a generic "Password update failed" instead of the specific reason (e.g. "Reset code has expired. Please request a new one.").Now reads
data.errorfirst, falling back todata.message.Changes
frontend/src/context/authContext.tsx:confirmForgotPasswordnow readsdata.error || data.message || 'Password update failed'.Related
Complements #471 (which applies the same fix to the login handler). This covers the password-reset case, which #471 doesn't touch — using the same
data.error || data.messagepattern for consistency.Testing
npm run build— no new errors.Before
Screen.Recording.2026-09-16.182320.mp4
After
Screen.Recording.2026-09-16.184153.mp4
Summary by CodeRabbit