diff --git a/packages/react/src/hooks/useRCAuth.js b/packages/react/src/hooks/useRCAuth.js index 83b013353..1722a27c8 100644 --- a/packages/react/src/hooks/useRCAuth.js +++ b/packages/react/src/hooks/useRCAuth.js @@ -25,6 +25,14 @@ export const useRCAuth = () => { const handleLogin = async (userOrEmail, password, code) => { try { const res = await RCInstance.login(userOrEmail, password, code); + if (!res) { + dispatchToastMessage({ + type: 'error', + message: + 'A network or connection error occurred. Please check your connection and try again.', + }); + return; + } if (res.error === 'Unauthorized' || res.error === 403) { dispatchToastMessage({ type: 'error',