fix(ui): handle auth/session errors using HTTP semantics#339
fix(ui): handle auth/session errors using HTTP semantics#339VarshiniGunti wants to merge 3 commits into
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: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ 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 |
|



📋 Description
JIRA ID: N/A (GitHub issue #114)
This PR updates MMU-UI to correctly consume REST-style HTTP error responses (4xx/5xx) instead of relying on side-effect navigation or opaque error objects.
What changed
AuthGuard.canActivate()to return explicit router-compatible values:truefor valid session responseUrlTree('/login')for invalid/expired sessionrouter.navigate()flow withmap(...)return logic.catchError(...)fallback to route to login viaUrlTreeon HTTP errors.HttpErrorResponse.400,401,403,404,409,500errorMessagewhen available.Motivation
Issue #114 requires UI to handle real HTTP status codes once backend endpoints stop returning 200 for all outcomes.
This PR makes authentication/session and login flows robust against 4xx/5xx semantics and removes route activation race behavior.
✅ Type of Change
ℹ️ Additional Information
Validation performed
canActivatenow returnsboolean | UrlTreeand no longer depends onrouter.navigate()side effects.HttpErrorResponseand displays status-aware messages./loginconsistently through guard return values.Linked scope