diff --git a/app/src/plugins/lib@auth/login/_components/a-login-form.vue b/app/src/plugins/lib@auth/login/_components/a-login-form.vue index 0d666a9..f292665 100644 --- a/app/src/plugins/lib@auth/login/_components/a-login-form.vue +++ b/app/src/plugins/lib@auth/login/_components/a-login-form.vue @@ -49,7 +49,7 @@ export default { await this.$store.dispatch('auth/login', this.form) this.$router.push({ name: 'Dashboard - Tasks'}) } catch (error) { - this.$toast.error(error?.response?.data?.message || error) + this.$toast.error(this.$parseError(error)) } } } diff --git a/app/src/plugins/w/toast/index.ts b/app/src/plugins/w/toast/index.ts index 7066825..d63e244 100644 --- a/app/src/plugins/w/toast/index.ts +++ b/app/src/plugins/w/toast/index.ts @@ -10,5 +10,6 @@ export default { app.use(VueToast) // app.config.globalProperties.$wToast = new Toast() + app.config.globalProperties.$parseError = (error) => error?.data?.message || error?.response?.data?.message || error?.message || error } } \ No newline at end of file