Changeset 3ae4bab for chapterx-frontend/src/store/authStore.ts
- Timestamp:
- 07/02/26 19:57:47 (3 days ago)
- Branches:
- main
- Children:
- a6e33d1
- Parents:
- a8f4a2d
- File:
-
- 1 edited
-
chapterx-frontend/src/store/authStore.ts (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
chapterx-frontend/src/store/authStore.ts
ra8f4a2d r3ae4bab 55 55 // If the backend responded with an error (4xx/5xx), surface it to the user 56 56 if (err?.response) { 57 const message = err.response.data?.message || err.response.data || 'In valid email or password.'58 throw new Error(typeof message === 'string' ? message : 'In valid email or password.')57 const message = err.response.data?.message || err.response.data || 'Incorrect email or password. Please try again.' 58 throw new Error(typeof message === 'string' ? message : 'Incorrect email or password. Please try again.') 59 59 } 60 60 // Network error / timeout — fall through to mock login … … 65 65 u => u.username === emailOrUsername || u.email === emailOrUsername 66 66 ) 67 if (!user) throw new Error(' User not found. Try using a quick-login option.')67 if (!user) throw new Error('No account found with this email. Please register first.') 68 68 set({ currentUser: user, token: null }) 69 69 },
Note:
See TracChangeset
for help on using the changeset viewer.
