diff --git a/stores/auth.ts b/stores/auth.ts index f1d0a26..351ae13 100644 --- a/stores/auth.ts +++ b/stores/auth.ts @@ -36,8 +36,9 @@ export const useAuthStore = defineStore('auth', () => { return true; } catch (error: any) { - console.error('Login failed', error) - throw new Error(error) + console.error('Login failed', error); + const message = error?.data?.detail || error?.message || 'Unknown error during login'; + throw new Error(message); } }