Ignore:
Timestamp:
07/02/26 19:57:47 (3 days ago)
Author:
kikisrbinoska <srbinoskakristina07@…>
Branches:
main
Children:
a6e33d1
Parents:
a8f4a2d
Message:

Changes for log in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapterx-frontend/src/store/authStore.ts

    ra8f4a2d r3ae4bab  
    5555          // If the backend responded with an error (4xx/5xx), surface it to the user
    5656          if (err?.response) {
    57             const message = err.response.data?.message || err.response.data || 'Invalid email or password.'
    58             throw new Error(typeof message === 'string' ? message : 'Invalid 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.')
    5959          }
    6060          // Network error / timeout — fall through to mock login
     
    6565          u => u.username === emailOrUsername || u.email === emailOrUsername
    6666        )
    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.')
    6868        set({ currentUser: user, token: null })
    6969      },
Note: See TracChangeset for help on using the changeset viewer.