Repository navigation
fix: Prevent crash when login API returns undefined - #1393
aryanpatil-07 wants to merge 2 commits into
Conversation
|
Could you please add a short demo video showing the offline/unreachable-server login flow and confirming there is no console TypeError? |
|
Hi @Aryan-Verma-999, Thanks for reviewing! Here is a short demo video showing the unreachable-server login attempt with DevTools open side-by-side: Screen.Recording.2026-10-23.160037.mp4As shown in the recording:
Please let me know if any other adjustments are needed! |
|
Thanks for the demo. The guard removes the secondary |
|
Hi @Aryan-Verma-999, That makes total sense, keeping the API contract strict by either returning the login result or throwing is much cleaner. I have updated Thanks for the feedback! |
fix: Prevent TypeError crash when login API returns undefined
Acceptance Criteria fulfillment
TypeError: Cannot read properties of undefined (reading 'error')whenRCInstance.loginreturns undefined.Video/Screenshots
PR Test Details
TypeErrorin the browser console, a clean error toast notification is displayed informing the user that the server is unreachable.Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-1393 after approval. Contributors are requested to replace
<pr_number>with the actual PR number.