Skip to content

Conversation

@vivekyadav-3
Copy link

Problem
Currently, when login fails due to network errors or unexpected server issues, users receive no feedback. The error is only logged to the console, leaving users confused about why login isn't working.

Solution
Added a user-friendly toast notification that appears when login fails unexpectedly. This provides clear feedback to users that there's a connection issue and suggests checking their network.

Changes

  • Enhanced error handling in useRCAuth.js hook
  • Added toast notification using existing dispatchToastMessage utility
  • Fixed typo: "A error" → "An error"

Testing

  • Build passes successfully
  • Uses existing toast infrastructure (no new dependencies)
  • Maintains existing error logging for debugging

User Impact
Users will now see: "Unable to connect to server. Please check your connection and try again." instead of being left wondering why login failed.

Copilot AI review requested due to automatic review settings January 25, 2026 16:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the login UX by surfacing a clear, user-friendly error notification when login fails unexpectedly (e.g., network/server issues), instead of only logging to the console.

Changes:

  • Corrected the console error message grammar from "A error occurred..." to "An error occurred..." in the useRCAuth hook.
  • Added an error toast in the useRCAuth login catch block using the existing dispatchToastMessage utility, with the message: "Unable to connect to server. Please check your connection and try again."
  • Kept existing console logging for debugging while ensuring end users receive visible feedback on connection/login issues.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant