From 5ca2e75df36f3848f6003da2525051c8e9e275b1 Mon Sep 17 00:00:00 2001 From: Rinpatch Date: Wed, 12 Dec 2018 19:31:16 +0300 Subject: [PATCH] Handle errors from server --- src/components/user_settings/user_settings.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index 424d0b85..cf37e71a 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -113,6 +113,8 @@ const UserSettings = { this.$store.commit('addNewUsers', [user]) this.$store.commit('setCurrentUser', user) this.previews[0] = null + } else { + this.$set(this.uploaderror, 0, this.$t('upload.error.base') + user.error) } this.uploading[0] = false }) @@ -141,6 +143,8 @@ const UserSettings = { this.$store.commit('addNewUsers', [clone]) this.$store.commit('setCurrentUser', clone) this.previews[1] = null + } else { + this.$set(this.uploaderror, 1, this.$t('upload.error.base') + data.error) } this.uploading[1] = false }) @@ -165,6 +169,8 @@ const UserSettings = { this.$store.commit('addNewUsers', [clone]) this.$store.commit('setCurrentUser', clone) this.previews[2] = null + } else { + this.$set(this.uploaderror, 2, this.$t('upload.error.base') + data.error) } this.uploading[2] = false })