fix: resolve duplicate login error popups and improve error robustness#77
fix: resolve duplicate login error popups and improve error robustness#77harrshita123 wants to merge 1 commit intoPSMRI:developfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
|
Seems to be duplicate code as #79 |



📋 Description
Summary: This PR fixes a bug on the login page where users would see two separate error popups at the same time when entering wrong credentials. I’ve also improved the error messaging to make it more reliable.
Issue: #124
Key Changes:
Updated the HTTP Interceptor to stop showing global error messages specifically for the login API. This prevents the "double popup" issue.
Refactored the Login Component's error handling to be more robust. It now correctly handles different types of server errors (like 500 Internal Errors) and avoids showing broken messages like "undefinedundefined".
✅ Type of Change
ℹ️ Additional Information
How it was tested:
Invalid Login: Entered wrong credentials and verified that only one clean "Unauthorized" popup appears. Server Downtime: Stopped the local API and verified that the UI shows a readable error message instead of crashing or showing "undefined".
Verification: Tested on both develop and main branches to ensure compatibility.