Better error handling
This commit is contained in:
parent
2132d58075
commit
2de756aa0c
3 changed files with 5 additions and 2 deletions
|
@ -50,6 +50,9 @@ const ImageCropper = {
|
|||
},
|
||||
cancelText () {
|
||||
return this.cancelButtonLabel || this.$t('image_cropper.cancel')
|
||||
},
|
||||
submitErrorMsg () {
|
||||
return this.submitError && this.submitError instanceof Error ? this.submitError.toString() : this.submitError
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<i class="icon-spin4 animate-spin" v-if="submitting"></i>
|
||||
</div>
|
||||
<div class="alert error" v-if="submitError">
|
||||
Error: {{ submitError }}
|
||||
{{submitErrorMsg}}
|
||||
<i class="button-icon icon-cancel" @click="clearError"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -124,7 +124,7 @@ const UserSettings = {
|
|||
this.$store.commit('addNewUsers', [user])
|
||||
this.$store.commit('setCurrentUser', user)
|
||||
} else {
|
||||
throw this.$t('upload.error.base') + user.error
|
||||
throw new Error(this.$t('upload.error.base') + user.error)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue